+ 5
What is the difference between the "NaN" and the "undefined" in JavaScript? Please help me to understand 👋🏼😊
5 Answers
+ 3
NaN: Not a number: As the name implies, it is used to denote that the value of an object is not a number. There are many ways that you can generate this error, one being invalid math operations such as 0/0 or sqrt(-1).
Undefined: It means that the object doesn't have any value, therefore undefined. This occurs when you create a variable and don't assign a value to it.
+ 4
NaN = Not_a_Number
Undefined = //no one defined it !!
+ 3
Bastien GERMANY (LeGerme) that's a confusing question 😵. No one defined that it's undefined 😆
+ 1
Please use the search bar before posting to avoid duplicates.
https://www.sololearn.com/discuss/1772843/?ref=app
https://www.sololearn.com/post/114993/?ref=app
0
Is it really true Dead ? 🤔