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


3030 because 10+20 will be 30. If there is numeric value before and after +, it treats as binary + (arithmetic operator).

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

Leave a Reply

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