SyntaxError: The use of a future reserved word for an identifier is invalid (Edge)
SyntaxError: “x” is a reserved identifier (Firefox)
SyntaxError: Unexpected reserved word (Chrome)
When Reserved keywords are used as identifiers they will throw error. enum is reserved in both strict and sloppy mode. while the following keywords are reserved in strict mode.
Example 1: The package is an identifier in strict mode, So it will work fine here.
This is GeeksForGeeks
Example 2: The enum is an identifier, So it will throw SyntaxError.
SyntaxError: Unexpected reserved word