function return value return a function with only one return value
function parameter variable parameter, indefinite parameter arguments
extract the inline styles style
Extract non-inline style currentstyle incompatible getcomputedstyle can be used in incompatible browsers when writing a program can use the IF function to handle compatibility issues
When extracting non-inline styles, composite styles (such as: Border,backgrund) are not extracted, and a single style (height,width) can be extracted
Use of arrays
Define VAR arr=[12,5,8,9]
var arr=new Array (12,5,8,9)
There is no difference between the two definitions, "" The performance is slightly higher, the code is relatively short
Properties of the array
Only one length can be obtained and can be set
the use principle of arrays : There should be only one type of variable in the array
Ways to manipulate arrays
Push adds a value to the end of the array
Pop minus tail one value
Shift subtracts a value from the head
Unshift adds a value to the head
Splice (starting point, length) can be deleted from among
Splice (start, length, Element) can replace elements from among
Links to concat arrays
Join joins the array inside the array with the specified symbol
Sort plus an If function reture (N1-N2)
Well, today to start the timer, will soon start the Carousel map, the road is far away, do not forget beginner's mind! Come on.
JavaScript, array, and function pass-through notes