我正在学习JavaScript,并且在浏览jQuery库时发现:
(冒号)被大量使用。这在JavaScript中有什么用?
// Return an array of filtered elements (r)
// and the modified expression string (t)
return { r: r, t: t };
var o = {
r: 'some value',
t: 'some other value'
};
在功能上等同于
var o = new Object();
o.r = 'some value';
o.t = 'some other value';
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句