0
Can someone explain this code?
if(+'15' === 15) { document.write('true'); } else if('15' === 15) { document.write('false'); } else { document.write('soloLearn'); } Why it evaluates to true instead of sololearn? What does that + sign stands for in the first condition block. I tried to google it but can't find the answer. Does it converts the string 15 into a number?
4 Answers