Question PRG-JS-0002
EasyWhat is the output of this program?
console.log(typeof NaN);
- A.
number
- B.
NaN
- C.
Show answer and explanation
Answer: A
NaN ('not a number') is still of type 'number' in JavaScript.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
JavaScript question
What is the output of this program?
console.log(typeof NaN);
number
NaN
Answer: A
NaN ('not a number') is still of type 'number' in JavaScript.
undefined
object