3rd Dec 2021, 1:34 PM
gokul b
gokul b - avatar
5 Antworten
+ 3
The correct syntax is isNaN, not isNan JavaScript is case sensitive
3rd Dec 2021, 1:45 PM
silentlearner
silentlearner - avatar
+ 3
The first line checks if the word 'String' is not a number. Since 'String' is not a number, the result is true and this result is assigned to the xx variable. The second line checks if 5+5 is not a number. Before checking, 5+5 will be evaluated to 10. Then it checks if 10 is not a number. Since 10 is a number, the result is false and this result is assigned to the yz variable. The if statement checks whether the result assigned to xx is false. Since xx is false, the code alerts the result of xx which is false.
3rd Dec 2021, 2:07 PM
silentlearner
silentlearner - avatar
+ 2
silentlearner thanks for your knowledgeable answer. Now, I got it.
3rd Dec 2021, 2:13 PM
gokul b
gokul b - avatar
+ 1
silentlearner Really I don't know what the code do. It's a challenge code. Can you tell about it ?
3rd Dec 2021, 1:56 PM
gokul b
gokul b - avatar
0
Thanks a lot
3rd Dec 2021, 1:48 PM
gokul b
gokul b - avatar