+ 1
Guys why console.log(1+"1") produces 11 But console.log(11-"1") produces 10
4 odpowiedzi
+ 4
Mayb an error would have been less confusing. Thats what I think.
+ 1
Lexus Collins which means "1" is a string when adding but an int when subtracting. Maybe I missed that in the sololearn javascript tutorial.