Echo JS 0.11.0

<~>

sbruchmann 3599 days ago. link 1 point
Actually, it should be considered as a bug, because calling `slice` on an `Object` should throw `TypeError: Object #<Object> has no method 'slice'`.
chris-l 3599 days ago. link 1 point
No, is not a bug. The Array.prototype.slice() is a generic method and can be used with array-like objects.

"The slice function is intentionally generic; it does not require that its this value be an Array object."

It pretty much works with any object that has a "length" property.

Keep in mind he is using it with ".call()", so he can use that object as "this".

Read about it here: http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.10