array.clear [method]

array.clear()

erases all items from the array, returns the array for chaining

a = [ 1, "asd", 8 ];
a.clear(); // a = []