It is possible to name a variable undefined in a local scope, but it is a very bad idea because undefined is what's
returned for values and properties that have not yet been created. Make undefined a variable and you lose your ability to test whether
other variables and properties exist.
function foo () {
var undefined = 1; // Noncompliant
if (nonExistantVar == undefined) { // this logic doesn't work now
// ...
}
}
function foo () {
var bob = 1; // anything is better than naming it 'undefined'
if (nonExistantVar == undefined) {
// ...
}
}