可能是重复问题:
javascript >>> operator?
JavaScript triple greater than
在这行代码中找到了这个运算符:
var t = Object(this),
len = t.length >>> 0;
这个操作符是什么意思?
下面是完整的代码。这是JS some
方法的代码:
if (!Array.prototype.some) {
Array.prototype.some = function(fun /*, thisp */) {
"use strict";
if (this == null) throw new TypeError();
var t = Object(this),
len = t.length >>> 0;
if (typeof fun != "function") throw new TypeError();
var thisp = arguments[1];
for (var i = 0; i < len; i++) {
if (i in t && fun.call(thisp, t[i], i, t))
return true;
}
return false;
};
}