What is the difference between “function () {}” and “new function () {}”?
08:26 12 Jul 2012

What is the difference between

RGBCatcher = new function(){}

and

var Basket = function(){}

One has new function() whilst the other simply has function(). Also one is using var.

javascript oop object