from Wikipedia https://en.wikipedia.org/wiki/JavaScript
JavaScript (/ˈdʒɑːvəˌskrɪpt/),often abbreviated as JS, is a programming language that conforms to the ECMAScript specification.
JavaScript is high-level, often just-in-time compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.
JavaScript is weakly typed, which means certain types are implicitly cast depending on the operation used.
+ operator casts both operands to a string unless both operands are numbers. This is because the addition operator doubles as a concatenation operator- operator always casts both operands to a number| left operand | operator | right operand | result |
|---|---|---|---|
| [](empty array) | + | [](empty array) | ""(empty string) |
| [] (empty array) | + | {} (empty object) | "[object Object]" (string) |
| false (boolean) | + | [] (empty array) | "false" (string) |
| "123"(string) | + | 1 (number) | "1231" (string) |
| "123" (string) | - | 1 (number) | 122 (number) |
('b' + 'a' + +'a' + 'a').toLowerCase(); // "banana"