src code

instance method Array#clear

Array#clear() → Array

Clears the array (makes it empty) and returns the array reference.

Example
var guys = ['Sam', 'Justin', 'Andrew', 'Dan'];
guys.clear();
// -> []
guys
// -> []