Native JavaScript array of interesting

added by JavaScript Kicks
9/1/2014 11:04:06 AM

63 Views

In JavaScript, you can create an array by two kinds of methods, constructors and array literals, the latter is the preferred method. The array object is inherited from Object.prototype, the array performs typeof operator returns ‘ object’ rather than‘array’. However, instanceof Array returns true executive []. In addition, there are kinds of array object is more complex, such as the string object, the arguments object. An instance of the arguments object is not Array, but has a length attribute, and value through the index gets, so it can be like an array by cyclic operation.


0 comments