doubledenial @doubledenial

TIL: In JavaScript, isNaN("") returns false, but parseInt("") returns NaN. o_o

Jul 30, 2022, 5:40 PM
5
View all

comments

Highlighted comment

isNaN(parseInt("")) == true

In that case you can use Number.isNaN since you’ll be passing in a number anyway