当通过underscore.js图书馆去,我碰到试图了解underscore.js
for (var i = 0, l = obj.length; i < l; i++) {
if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
}
// Establish the object that gets returned to break out of a loop iteration.
breaker = {};
为什么在最后使用return
? i in obj
检查什么?
什么功能是吗?也许是来源的链接? – 2012-04-04 02:52:10
Julian Bucknall(Developer's Express的首席技术官)最近刚刚发表了一系列关于理解underscore.js的博客文章。我没有方便的URL,但也许你可以在http://devex.com或者通过互联网发现一个参考文章。我会尽力找到明天的链接,如果您当时还没有找到答案,请更新此评论。 – 2012-04-04 02:54:48
发现的链路http://www.devexpress.com/Support/Webinars/details.xml?id=UnderscoreJS](http://www.devexpress.com/Support/Webinars/details.xml?id=UnderscoreJS) – Lordking 2012-04-04 08:07:51