Edit: This question is out of date as the Polyfill example has been updated. I'm leaving the question here just for reference. Read the correct answer for useful information on bitwise shift operators.
Question:
On line 7 in the Polyfill example of the Mozilla Array.prototype.indexOf page they comment this:
var length = this.length >>> 0; // Hack to convert object.length to a UInt32
But the bitwise shift specification on Mozilla clearly states that the operator returns a value of the same type as the left operand:
Shift operators convert their operands to thirty-two-bit integers and return a result of the same type as the left operand.
So shouldn't length receive the standard 64-bit float value? Or can someone point out to me where the hack starts?