JavaScript Study Notes: Arrays
How to create arrays (two ways)
1: Create arrays using literals
How to determine whether something is an array
Ways to add or remove elements in an array
Sorting the array
Array indexing methods
Use indexOf, for example: arr.indexOf(yuan);// It searches from front to back
Use lastIndexOf, for example: arr1.lastIndexOf(yuan);// It searches from back to front.
Note that if the array does not contain that content, it will return -1.
Characters returned from a string
Using charAt, you can return the character at the corresponding position in the string.
Using charCodeAt, it returns the ASCII code of the corresponding character in the string.
str[index], returns the character as a string. It is used in HTML5, with compatibility issues.
Convert an array to a string (string type)
TEXT_MARKDOWN