The JavaScript exception "variable is a reserved identifier" occurs when reserved keywords are used as identifiers.
The JavaScript exception "variable is a reserved identifier" occurs when reserved keywords are used as identifiers.
Reserved keywords will throw in if they are used as identifiers. These are reserved in strict mode and sloppy mode:
enum
The following are only reserved when they are found in strict mode code:
implements
interface
let
package
private
protected
public
static
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Reserved_identifier