Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Web technologies Questions | JavaScript Course Quiz 1 | Question 8

  • Last Updated : 10 May, 2019

What will be the output of the following code?

document.write(typeof('1' + 2));

(A) ‘number’
(B) ‘string’
(C) ‘boolean’
(D) None of the above

Answer: (B)

Explanation: The ‘+’ operator will perform concatenation if either of the variables is a string.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!