Alex Zaytsev

Results 284 comments of Alex Zaytsev

> However, Array#map, which uses the exact same if (i in self) check, does in fact iterate over undefined in IE 8. No, it does not.

`Array = function(){return arguments;}` ?

@Xotic750 I get `false` and `false` for console.log('2' in testSubject); // true console.log(testSubject.hasOwnProperty('2')); // true in IE8

@Xotic750 > but `arguments` does work as expected, it produces an array-like object where if the argument supplied was `undefined` then it can be tested for using `in` or `hasOwnProperty`....

> It is because you are using apply on returnArgs instead of You can not skip argument in that notation.

``` 2 in Array.prototype.slice.call(returnArgs(2, 3, undefined, true, 'hej', null, false, 0)) > false 2 in returnArgs(2, 3, undefined, true, 'hej', null, false, 0) > true ```

So I think the true reason is because you use patched `Array.prototype.slice`

Yes, this works LOG: [object Array] LOG: 8 LOG: 2 LOG: false LOG: false LOG: true LOG: true LOG: undefined For this: http://jsfiddle.net/BVPqT/3/ (changed to Array.prototype.slice.call) it returns LOG: [object...

@ljharb you've missed first arugment for apply (this): ``` 1 in (function () { return arguments; }).apply(undefined, [0, undefined, 2]) > true ```