I\'m learning Backbone, which uses Underscore.
In some examples, I see initialization code to create an empty array of children like this:
// inside
From http://underscorejs.org/#chaining
You can use Underscore in either an object-oriented or a functional style, depending on your preference. The following two lines of code are identical ways to double a list of numbers.
_.map([1, 2, 3], function(n){ return n * 2; }); // Functional style
_([1, 2, 3]).map(function(n){ return n * 2; }); // OO style
So when using the OO style, the _ is used as a constructor function. Without the first two lines in the constructor function that "Creates a safe reference to the Underscore object" you would have to use the new keyword, as follows
new _([1, 2, 3]).map(function(n){ return n * 2; });
Now you don't :)