And this one(liner)?
Vladislav Ladicky
1

Wouldn’t it be easier to just:

console.log(+"1234");  // 1234
console.log(+"ABC"); // NaN

Why create a redundant function for that?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.