
Why ss*2 is not 4545 ?

Why ss*2 is not 4545 ?
Great question! * is not an operation that is available for strings. (There is a .repeat() method: String.prototype.repeat() - JavaScript | MDN)
Because JavaScript is not explicitly typed, when it sees a numeric operation, it will attempt to coerce the value into a number.
Because JavaScript is not explicitly typed, when it sees a numeric operation, it will attempt to coerce the value into a number.
This is correct, but worth noting is if one had tried ss+2, the operation wouldn’t be 45+2 because the + gets prioritized as a concatenation operation of the string ‘45’.