Skip to content

Commit e6df295

Browse files
committed
adding tricky js Questions collection
1 parent 35bddc4 commit e6df295

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Javascript/Tricky-JS-Problems/Collection-of-Tricky-JS-Questlions.md

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
#### Question: What is '6'+9
1414

1515
**Answer**: 69. If one of the operands of the plus (+) operator is string it will convert other number or boolean to string and perform a concatenation. For the same reason, "2"+true will return "2true"
16+
17+
#### Question: What is the value of 4+3+2+"1"
18+
19+
**Answer**: 91 . The addition starts from the left, 4+3 results 7 and 7+2 is 9. So far, the plus operator is performing addition as both the operands are number. After that 9 + "1" where one of the operands is string and plus operator will perform concatenation.

0 commit comments

Comments
 (0)