Basic JavaScript Question:

How about 2+5+"8"?

Tweet Share WhatsApp

Answer:

Since 2 and 5 are integers, this is number arithmetic, since 8 is a string, it’s concatenation, so 78 is the result.

Download JavaScript PDF Read All 114 JavaScript Questions
Previous QuestionNext Question
What Web sites do you feel use JavaScript most effectively (i.e., best-in-class examples)? The worst?What is the difference between SessionState and ViewState?