La fonction JavaScript de déclaration et d'évaluation afin

Pourquoi le premier de ces exemples fonctionnent pas, mais tous les autres ne le font?

//1 - does not work
(function() {
setTimeout(someFunction1, 10);
var someFunction1 = function() { alert('here1'); };
})();

//2
(function() {
setTimeout(someFunction2, 10);
function someFunction2() { alert('here2'); }
})();

//3
(function() {
setTimeout(function() { someFunction3(); }, 10);
var someFunction3 = function() { alert('here3'); };
})();

//4
(function() {
setTimeout(function() { someFunction4(); }, 10);
function someFunction4() { alert('here4'); }
})();
InformationsquelleAutor jnylen | 2010-10-08