Built-in objects are equivalent to built-in constructors
The built-in objects are broadly divided into three categories:
Data encapsulation Class object--object, Array, Boolean, number, and string
Tool Class object--math, Date, regexp, etc. to provide traversed objects
Error class objects-including generic error objects and various other more special error class objects
Object: Parent object for all objects
To create an empty object:
var JX = {};//Object text identification method
var jx = new Object ();//object constructor function
Contains the methods and properties:
constructor properties for constructor//constructors
ToString ()//Returns the description string for the object
ValueOf ()//return to the object itself
Array: Building the built-in constructor function of an array, also an object (typeof Jx-->object)
var jx = new Array ();
var JX = [];
Abnormal phenomena
var JX = new Array (single digit);//Create an array of numeric lengths
Some special places relative to the object:
Property names are incremented from 0, and values are automatically generated
Have the Length property
Extended built-in methods on parent objects
Interesting array methods
Sort ()//sorting, small to large
Join (optional character)//string to concatenate all elements in the array
Slice (start,end)//Returns one of these fragments without modifying the target array, with a base of 0
Splice (Start,end, new Element)//Modify the target array, replace the modified array with the new element
Push ()//end add a new element jx[jx.length] = new
Pop ()//end Delete an element jx.length--
JavaScript built-in objects