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


102030 because after a string all the + will be treated as string concatenation operator (not binary +).

function display()  
{  
  document.writeln("10"+20+30);  
}  
display();  

Leave a Reply

Your email address will not be published. Required fields are marked *