Clone an array with slice - Node.js Array

Node.js examples for Array:Array Operation

Description

Clone an array with slice

Demo Code

Array.prototype.clone = function() {

    return this.slice(0);
};

Related Tutorials