Here you can find the source of clear()
Array.prototype.clear = function(){ this.splice(0, this.length);/*ww w. j av a 2s. c o m*/ }
Array.prototype.clear = function(){
this.length = 0;
};
Array.prototype.clear=function(){
this.length=0;
Array.prototype.clear = function() { return this.splice(0,this.length); };
Array.prototype.clear = Array.prototype.clear || function() {
this.length = 0;
};
Array.prototype.clear = function () { this.length = 0; return this; };
Array.prototype.Clear = function()
this.splice( 0, this.length );
};