Not just the name, the entire function declaration is hoisted. That's the difference between:
function () {
...
var a = function () {};
}
which gets hoisted to: function () {
var a;
...
a = function () {};
}
and: function () {
...
function a () { };
}
Which gets hoisted in it's entirety to: function () {
function a () { };
...
}
Which will cause difference behaviour between the two when calling a in the ... section, working in the latter case but undefined in the first.I don't think the grandparent was unclear about this in his post though.