- A '105'
- B '55'
- C 55
- D '10'
- Share this MCQ
Answer:
A
Share this MCQ
The result of the code is '105'
.
In JavaScript, the + operator has two different meanings depending on the type of the operands.
If at least one of the operands is a string,
the +
operator performs string concatenation.
In this case, the first 5 is converted to the string '5'
,
and the second 5 is also converted to the string '5'
, so the final result is '105'
.
Share this MCQ