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

1 Answer

0 votes
by

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

  1. function display()  
  2. {  
  3.   document.writeln(10+20+"30");  
  4. }  
  5. display();  

Related questions

0 votes
asked Mar 21, 2021 in JavaScript by rajeshsharma
0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986
...