JavaScript has special identifiers that, while not reserved, still should not be used as identifiers. They include:
eval - evaluates a string as JavaScript code
arguments - used to access function arguments through indexed properties.
undefined - returned for values and properties that have not yet been assigned
NaN - Not a Number; returned when math functions fail.
Infinity - when a number exceeds the upper limit of the floating point numbers
These words should not be bound or assigned, because doing so would overwrite the original definitions of these identifiers. What’s more, assigning or binding some of these names will generate an error in JavaScript strict mode code.
May be this is not a real issue but would be great if the alert could be avoided.
Current release contains a redefinition of "undefined". This redefinition is detected by the "Special identifiers should not be bound or assigned" Sonar rule. According to the rule:
May be this is not a real issue but would be great if the alert could be avoided.
Thanks.