how to set array to empty in javascript code example
Example 1: javascript empty array
var colors = ["red","blue","green"];
colors = []; //empty the array
Example 2: how to make array empty
A.length = 0
var colors = ["red","blue","green"];
colors = []; //empty the array
A.length = 0