1. array object
An array is a common data structure. It is generally used to store a group of identical objects or data.
Main attributes:
Attribute |
Description |
Length |
Number of elements in the current array |
Prototype |
Allow additional attributes to be added to an array object |
Common Methods:
Method |
Description |
Concat |
Concatenates two arrays and returns a new group. |
Join |
Combine all elements in the array into a string and return |
Pop |
Remove a nonprime from the end of the array and return the value of this nonprime. |
Push |
Press an element to the end of the array. |
Reverse |
Returns the array in the original order. |
Shift |
Removes the first element from the array and returns the value of this element. |
Slice |
Evaluate the sub-array of the array and return this array |
Sort |
Sorts elements in an array. |
Splice |
Insert/delete or replace elements in the array |
Tostring |
Converts an array to a string. |
Unshif |
Insert an element at the beginning of the array |
2. boolean object
A boolean object is a Boolean encapsulation. A boolean object is used to convert a non-Boolean value to a Boolean value. For a non-Boolean value, use the following rules for conversion.
1. All objects are considered true.
2. the string is considered as false only when it is null,
3. null and undefined are considered false.
4. if and only if the value is zero, the value is false.
3. date object
The date object constructor has the following format:
1. New Date ().
2. New date ("Month day, year hours: Minutes: Seconds ")
3. New Date (yr_num, mo_num, day_num)
4. New Date (yr_num, mo_monum, day_num, hr_num, min_num, sec_num)