The original commenter was a total jerk, but he’s not wrong. Strong and weak typing have very specific meanings in programming languages, and you’re using the terms wrong.
Weak typing is when the language does not care at all about your types. You have to pick the exact right instruction for the data types of the arguments. A language with strong typing cares deeply for the data types, and usually they try to prevent bad things from happening.
Consider any assembly language. It’s weakly typed. If you want to add the values in two registers together as 32-bit integers, there’s an assembly instruction that will do exactly that. It doesn’t matter that one register was holding the pointer to an array and the other had two 16-bit signed integers. You get the sum of the bit patterns in those registers interpreted as 32-bit integers.
There’s a completely different instruction for adding two 64-bit integers. And there are different instructions for signed versus unsigned integers.
Worse yet, if you have an integer in a register, and you treat it as a pointer, the processor might not like it. It might not point to your memory (a “segmentation fault”), or it might not be a valid memory address (a “bus error”), or it works but points to the completely wrong data.
If you’ve done any C programming, those errors might sound familiar. C has some type checking, but it can be weak, and you can always bypass it (with type casts and union structs).
JavaScript, in contrast, does not have these problems because it is strongly typed. If a value is an integer, it’s an integer. You can’t suddenly convince JavaScript to treat it like a pointer to string. JavaScript is further strongly typed with respect to its operators. + changes meanings depending on the data you give it. “Integer + integer” results in the sum of the integers. “String + string” results in the concatenation of the strings.
Because JavaScript is not statically typed, an expression like “a + b” is ambiguous. Are you going to get an integer back? a string? something else? Sometimes you have to actually run the code to find out. It’s a dynamic (i.e., runtime) decision. But whatever you get back, will be based on the data types of values in a and b.
“Integer + string” also has a meaning in JavaScript: the integer is converted into a string, then the two strings are concatenated. There are no surprises with the conversion or the concatenation, and it can’t go wrong (unless JavaScript was implemented poorly). JavaScript understands the types, and its + operator knows how to handle them in a variety of combinations. That’s not weak at all; it’s amazingly strong.
I think some people confuse “flexible” with “weak”. + in JavaScript is very flexible. I didn’t even cover half of what it can do with different data types. Throw whatever you want at +, and it will not get confused by the data types. It might not like some of them, but it will at least recognize the types it doesn’t like. There’s nothing weak about that.