+ 2
Explain pls the output of this code
var x ="5", y=10 document.write(+x+y) The output is 15. Why? I thought it should be something like 510...
2 Answers
+ 5
+ symbol before X converts X into number/interger type, therfore answer is 15.
+ 1
Rhythm Khandelwal ćļ¼Øļ¼”ļ¼°ļ¼°ļ¼¹ ļ¼“ļ¼Æ ļ¼Øļ¼„ļ¼¬ļ¼°ć thankyou guys āŗ that makes sense