The Prototype Array.prototype.clear function empties an array and returns itself.
Array.prototype.clear
arr = [47, 11]; arr.clear(); alert(arr.length); // returns 0, the new length of the empty array.