Clear array to remove all elements - Node.js Array

Node.js examples for Array:Clear

Description

Clear array to remove all elements

Demo Code

Array.prototype.clear = function() {
  return this.splice(0,this.length);
};

Related Tutorials