What will be the output of the following code?
< script >
document.write( typeof( ‘1’ + 2) );
</ script >
(A)
‘boolean’
(B)
‘string’
(C)
‘number’
(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
Please comment below if you find anything wrong in the above post
Article Tags :
Recommended Articles