Hi, all.
I have a quick question (I hope!). In JS, why does isNaN(" ")
evaluate to false, but isNaN(" x")
evaluate to true?
I'm performing numerical operations on a text input field, and am checking if the field is null, "", or NaN. When someone types a handful of spaces into the field, my validation fails on all three, and I'm confused as to why it gets past the isNAN check.
Thanks!