jquery array clear code example
Example 1: javascript empty array
var colors = ["red","blue","green"];
colors = []; //empty the array
Example 2: clear arrays in jquery
arr.splice(0, arr.length)
var colors = ["red","blue","green"];
colors = []; //empty the array
arr.splice(0, arr.length)