Web technologies Questions | JavaScript Course Quiz 1 | Question 8
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


