Expert Developer JavaScript Question: Download Questions PDF
What would "1"+2+3 and 1+2+"3" evaluate to, respectively?
![Expert JavaScript Developer Interview Answer Expert JavaScript Developer Interview Question](https://globalguideline.com/public/images/interview/22.png)
Answer:
When the first character is a string, the remaining characters will be converted into a single string, rendering 123.
If the string is at the end, the initial characters will perform normal mathematical functions before converting into a string, resulting in 33.
If the string is at the end, the initial characters will perform normal mathematical functions before converting into a string, resulting in 33.
Download Expert JavaScript Developer Interview Questions And Answers
PDF
Previous Question | Next Question |
What is the disadvantages using innerHTML in JavaScript? | What is event bubbling, and why is it beneficial to use? |