Question PRG-JS-0023
EasyWhat is the output of this program?
console.log("5" - 3);
- A.
NaN
- B.
Error
- C.
Show answer and explanation
Answer: C
- works only on numbers, so "5" is converted to 5 and 5 − 3 = 2.
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("5" - 3);
NaN
Error
Answer: C
2
53