Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array.isArray( arrayLikeObject ) #150

Open
Yaffle opened this issue May 6, 2014 · 2 comments
Open

Array.isArray( arrayLikeObject ) #150

Yaffle opened this issue May 6, 2014 · 2 comments

Comments

@Yaffle
Copy link

Yaffle commented May 6, 2014

why not
arrayLikeObject instanceof Array ?

@Yaffle
Copy link
Author

Yaffle commented May 6, 2014

... Array and Array.prototype in each window are different ... bla-bla-bla ...
I know this.
But any object will be different, not only Array, but only for array we have Array.isArray.
So anybody who loves to use objects from another "window", should avoid usage "instanceof".

@stegano
Copy link

stegano commented May 4, 2016

I agree @Yaffle Array.isArray is an ES5 method so not supported by older browsers, but it reliably determines if an object is an Array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants