Question PRG-JS-0001
EasyWhat is the output of this program?
console.log(typeof 'hello');
- A.
undefined
- B.
number
- C.
Show answer and explanation
Answer: C
typeof returns 'string' for text values.
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 'hello');
undefined
number
Answer: C
typeof returns 'string' for text values.
string
object