What will happen if we call isNAN function on “seventy-eight” and 78? A. It will
ID: 3886623 • Letter: W
Question
What will happen if we call isNAN function on “seventy-eight” and 78?
A. It will return false for both “seventy-eight” and 78 because both are numbers.
B. It will return true for “seventy-eight” and 78 because “seventy-eight” is a string and 78 is a number.
C. It will return false for “seventy-eight” and true for 78 because “seventy-eight” is easy to read and 78 is not.
D. It will return false for both “seventy-eight” and 78 because JavaScript will treat “seventy-eight” and 78 the same though auto conversion.
Explanation / Answer
As we know isNaN() function will return true if the value is not a number else it returns false.
As 78 is number so it returns false and seventy eight is string so it returns true .
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.