[Javascript] Various types to create functions - I am confused

JS Student tuofamerikazmostwanted at gmail.com
Thu Oct 4 01:16:19 CDT 2007


These are the various methods to create functions in JavaScript:

var foo = new Function();
var bar = Function();
var baz = function() {}
function zag() {}

My question is why there so many ways to do one task? Do these methods
serve some specific purpose or is it just redundancy?

Thanks



More information about the Javascript mailing list