At the bottom of the variables section, this code example is given:
// bad
function() {
var name = getName();
if (!arguments.length) {
return false;
}
return true;
}
// good
function() {
if (!arguments.length) {
return false;
}
var name = getName();
return true;
}
At the top of that code block it says:
Assign variables at the top of their scope. This helps avoid issues with variable declaration and assignment hoisting related issues.
It's not clear what point the code example is trying to make, as it doesn't reflect the statement made in that comment. Plus, the name variable is defined but never used.