You are viewing one comment and its replies. View all comments · View the comment above
fun fact: getting NaN from a numeric calculation is the error that you handle. if this wasn’t obvious, please don’t write code for anyone but yourself. hope this helps.
if this wasn’t obvious,
If this wasn’t obvious, be glad of the chance to learn.
If we all stopped as soon as something simple wasn’t obvious, nobody would learn and nobody would do anything.
What a terrible reply to someone. It cuts off curiosity and says “You are too stupid to do anything.”
Yet I bet there was a time that even with that very specific thing, you didn’t think of it that way.
newcomers to shitting on javascript sometimes learn to blame the tool
NaN is a primitive value, not an Error.
NaN
Error
>> typeof 1 / "a" "number"
Sign in to comment. Sign in
Comments
fun fact: getting NaN from a numeric calculation is the error that you handle. if this wasn’t obvious, please don’t write code for anyone but yourself. hope this helps.
If this wasn’t obvious, be glad of the chance to learn.
If we all stopped as soon as something simple wasn’t obvious, nobody would learn and nobody would do anything.
What a terrible reply to someone. It cuts off curiosity and says “You are too stupid to do anything.”
Yet I bet there was a time that even with that very specific thing, you didn’t think of it that way.
newcomers to shitting on javascript sometimes learn to blame the tool
NaNis a primitive value, not anError.>> typeof 1 / "a" "number"Sign in to comment. Sign in