What is the output of "10"+20+30 in JavaScript?

Forums JavaScriptWhat is the output of "10"+20+30 in JavaScript?
Staff asked 3 years ago

Answers (1)

Add Answer
Staff answered 2 years ago
It would produce 3030. 
Javascript reads and evaluates from left to right, so when it comes across “30,” “+” functions as concatenation operator (a string).

Subscribe

Select Categories