Skip to content
Related Articles

Related Articles

Save Article
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?




<script>
document.write(typeof('1' + 2));
</script>

(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 :