Here you can find the source of clear()
Array.prototype.clear = function () { this.length = 0;/*from ww w . java 2 s . c o m*/ }; ===? Array.prototype.removeAt = function (pos) { this.splice(pos, 1); };
Array.prototype.clear = function() { this.length = 0; return this; };
'use strict'; Array.prototype.clear = function() { this.length = 0;
window.onload = function(){ test(); Array.prototype.clear = function(){ console.log(this.length); for(var i = 0;i < this.length;++i) this.pop(); function test(){ ...
Array.prototype.clear = function() { this.length = 0; return this; };
Array.prototype.clear = function () { for (var i = 0, a = 0; i < this.length; i++) { this[i] = null; this.length = 0; };
Array.prototype.clear = function() {
this.length = 0;
};
Array.prototype.clear = function()
this.splice(0, this.length);
};