DEV Community

Discussion on: You are an array

Collapse
bias profile image
Tobias Nickel

Yes, 'Array.isArray' is the right choice.
but not only for the sake if convenience. I heared in some podcast, it is about workers and iframes. While Arrays in each frame or worker are a class from the same code, at each runtime they are a "new class". with 'isArray' it works, even dough an array was taken from a other related js scope.

Collapse
volker_schukai profile image
Volker Schukai Author

Yes you are right. I try to express that with my iframe example above.