built-in objects in js

1. What is a built-in object
1. What is a team like
all things in js are objects, strings, values, arrays, functions
Each object has properties and methods
js allows custom objects
2. Custom objects:
1) Define and create object instances
2) Use functions to define objects, and then create new object instances
Second , string objects 1. string
objects:
string objects are used to process existing strings.
Strings
can use single or double quotes Owned methods Find
the
content of the string indexOf() in the string to match the match()
string case conversion: toUpperCase()/toLowerCase()
3. Date date object 1. Date date object Function 2 for
processing date and time .Have the method getFull year() to get the current year setFullyear() to set the year getTime() to get the milliseconds getDay() to get Thursday , an array object 1. Arrer object: use a separate variable name to store a series of values ​​2. Array The method concat() merges the arrays sort() sorts












Push() appends elements at the end
reverse() array elements flip
5. Math object
1. math object: perform common arithmetic tasks
2. Common methods:
round() rounding
random() returns a random number between 0-1
max() Returns the highest value
min() returns the lowest value
ads() returns the absolute value

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326745286&siteId=291194637