I need to check a value is a number. I have two solutions:
typeof input !== 'number'
and
isNaN(input)
What is the difference. Who choose one over the other?
I need to check a value is a number. I have two solutions:
typeof input !== 'number'
and
isNaN(input)
What is the difference. Who choose one over the other?