create array of empty javascript code example
Example 1: javascript empty array
var colors = ["red","blue","green"];
colors = []; //empty the array
Example 2: generate empty array js
Array.from({length: 500})
// change the length to whatever value you want