Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c34b09f

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

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎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)

AltStyle によって変換されたページ (->オリジナル) /