document.write("1 plus 1 is " + 1 + 1);
(A) 1 plus 1 is 2
(B) 1 plus 1 is 11
(C) 1 plus 1 is 1 + 1
(D) 2
The correct answer is 1 plus 1 is 11
+ is the concatenation operator. In Java Script String + Number converted into String
So “1 plus 1 is “+ 1= “1 plus 1 is 1”
“1 plus 1 is 1”+1=”1 plus 1 is 11”
No comments:
Post a Comment