By sonic0002
via pixelstech.net
Submitted: Jan 24 2013 / 07:27
JavaScript is a loosely typed scripting languages. It has objects which contains name value pairs. While in JavaScript, Array is also an Object, we can use instanceof to check the type of an object. But if there are many frames in a page, if the object is created from a frame which is not at the same global scope as window object, instanceof will not work since Array is a property of window. So how can we determine whether an object is an array or not in JavaScript?
Tweet
SaveShareSend
Tags: javascript
Add your comment