Earlier quoted context omitted.
Disagree... for example from the link: In JavaScript: '5' + 3 gives '53' Whereas '5' - 3 gives 2 That's just logical and obvious, since "+" is both numerical addition, and string concatenation, but "-" is only numerical subtraction, and the '5' starts out as a string. Every language has 'gotchas'. Doesn't really matter which you pick to learn first at all. The more important thing is that you don't give up. possibly…
That's definitely not obvious. Some people think in patterns or generalizations. String [binary_operator] Number = String String [binary_operator] Number = Number That's just begging for further explanation. Explaining JavaScript is probably more challenging than say Java. Java has many keywords and usages, but when it comes to explaining the concept of those keywords/semantics to students, it may be a little bit les…
Left hand side is a string, and "+" is string concatenation as well as addition. So '5' + 3 = '53' (String concatenation). Just as "Hello" + 1 would equal "Hello1". The right hand side is converted to a string.
Left hand side is a string, but "-" is subtraction for numbers. JS converts the '5' to a number, then subtracts. So '5' - 3 = 2 (Numerical subtraction).
That's the explanation, and it's not terribly hard to get past.