JavaScript makes it easy to make mistakes when emptying array elements:
var myarray=[];
MyArray = null; it's wrong, personally. After this assignment, MyArray will change from the array type to the string variable
Empty the array element, should myarray = [];
or myarray = new Array ();
Array declarations in javascript:
var myarray=new Array();
or Var myarray=[];
Common functions for arrays in javascript:
ToString (): Converts an array to a string
toLocaleString (): Converts an array to a string
Join (): Converts an array to a symbolic concatenated string
Shift (): Moves an element of the array head out
Unshift (): Inserts an element in the head of an array
Pop (): Deletes an element from the tail of the array
Push (): Adds an element to the tail of the array
Concat (): Adding elements to an array
Slice (): Returns the part of an array
Reverse (): Sort the array backwards
Sort (): Sort operations on an array
Splice (): Inserting, deleting, or replacing an array element
The JavaScript array does not need to be set length, it expands itself, and the array name. Length returns the number of elements
After learning C #, it's easy to make mistakes in JavaScript arrays