"y", "return x + y;"); Function constructor 1 function add(x, y) { 2 return x + y; 3 } Function declaration Function expression 1 var add = function(x, y) { 2 return x + y; 3 }; lundi 16 septembre 13
an exception. Thus any anonymous functions that you want to reference will need to be named, like so: 1 setTimeout(function later(){ 2 // do stuff... 3 setTimeout( later, 1000 ); 4 }, 1000 ); 5 • nom de la fonction • argument.callee • variable in-scope ECMAScript 5 - strict mode lundi 16 septembre 13