Question PRG-JS-0021
EasyWhat is the output of this program?
console.log(typeof 42);
- A.
number
- B.
integer
- C.
Show answer and explanation
Answer: A
JavaScript has one numeric type for both integers and decimals, reported as "number".
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 42);
number
integer
Answer: A
JavaScript has one numeric type for both integers and decimals, reported as "number".
int
float