src code
Array#clear() → Array
Clears the array (makes it empty) and returns the array reference.
var guys = ['Sam', 'Justin', 'Andrew', 'Dan']; guys.clear(); // -> [] guys // -> []