Functions
function sumA (a, b) { return a + b; }
var sumB = function (a, b) { return a + b; };
var sumC = new Function("a", "b", "return a + b;");
// how to use them
sumA(4, 5);
sumB.call({}, 4, 5);
sumC.apply({}, [4, 5]);
Back to presentation
function sumA (a, b) { return a + b; }
var sumB = function (a, b) { return a + b; };
var sumC = new Function("a", "b", "return a + b;");
// how to use them
sumA(4, 5);
sumB.call({}, 4, 5);
sumC.apply({}, [4, 5]);