How to check if value is NaN in Typescript? [duplicate]
Solution 1:
Same as JavaScript, isNaN
.
if (isNaN(someObject.someValue)) ...
Or the more modern Number.isNaN
if (Number.isNaN(someObject.someValue)) ...
Same as JavaScript, isNaN
.
if (isNaN(someObject.someValue)) ...
Or the more modern Number.isNaN
if (Number.isNaN(someObject.someValue)) ...