Var b is a string, and it'll treat addition like string concatenation (aka just adding a message.) Since it's concatenation, it'll then turn the numbers/integers into strings.
This kind of behavior might be different depending on the language, though. Some languages might not allow this. (For example, C and C++)