Use the following syntax to empty an Array. Here myArray is the name of Array.
myArray = ;
The above code will create an Array named myArray with no content. If the myArray already exists, will lose all the existing elements.
You can also set the length to 0 to make it empty.
myArray.length = 0