NaN (Not a Number) in JavaScript — in plain words
NaN shows up when JavaScript tries to make a number, but it can’t. You’ll see it a lot while parsing strings or doing invalid math. Fun fact: typeof NaN is "number". A quick look with parseInt Here foo looks like a number, but its type is string. Us...
Oct 27, 20252 min read12
