Skip to content

Commit c34b09f

Browse files
authored
Create output.js
1 parent 0f32a87 commit c34b09f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Interview-Questions/output.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// 1) What is the output of 10+20+"30" in JavaScript?
2+
//Ans: 3030 because 10+20 will be 30. If there is numeric value before and after +, it treats as binary + (arithmetic operator).
3+
4+
// 2) What is the output of "10"+20+30 in JavaScript?
5+
// Ans: 102030 because after a string all the + will be treated as string concatenation operator (not binary +).

0 commit comments

Comments
 (0)