HASTY
JS
performance
Is number? - {Shorts}
A few neat ways of checking for numbers using JavaScript
Globals
const data = [ ...new Array(1000).fill(0).map(() => Math.random() > 0.5 ? ~~(Math.random() * 10) : "nop") ]
Cases
0 ops/s
data.filter(x => !isNaN(parseInt(x)))
0 ops/s
data.filter(x => x < 0 || x > 0)
0 ops/s
data.filter((x) => !isNaN(x))
Page
Shorts
Wall of Love
Embed
Share
Donate
Options
Epochs:
Timeout:
Run