什么是“_”意味着什么? [英] What does "_" means here?

查看:146
本文介绍了什么是“_”意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习backbone.js,在它的教程中,它有以下代码

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

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

我不明白 _ 在代码中,它意味着什么?什么是延伸?它与jQuery.extend具有相同的含义吗?

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 ?

推荐答案

它将所有Backbone.Events属性复制到对象上。 Extend是下划线库中的一种方法:
http://documentcloud.github.com/underscore / #extend

It copies all the Backbone.Events properties over to the object. Extend is a method from the underscore library: http://documentcloud.github.com/underscore/#extend

我认为它与jQuery方法相同。

I'd say it's the same as the jQuery method.

这篇关于什么是“_”意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆