Alex Rivera | Logout

What does "_" means here?

Asked 2011-03-24T11:20:08.937
26

I am learning backbone.js, in it's tutorial, it has the following code

var object = {};
_.extend(object, Backbone.Events);
...

I don't understand the "_" in the code, what does it means? and what is this "extend"? does it has the same meaning as jQuery.extend ?

Edit
Report

1 Answer

23

From Backbone's own homepage :

Backbone's only hard dependency is Underscore.js.

_ is the object created by Underscore.js, in the same way as $ is the jQuery object

http://documentcloud.github.com/underscore/#extend as for what _.extend does.

answered 2011-03-24T11:28:58.640

Your Answer