This is not a reserved word. Without quotes, javascript will interpret the character - as a subtraction operator, try to perform the operation and fail.
One of the reasons for this is that javascript prefers to ignore spaces whenever possible. Thus, 2 - 3 coincides with 2-3 .
Enclosing everything in quotation marks makes js be interpreted as just another character, not an operator.
user2625787
source share