Fill array from another array - Node.js Array

Node.js examples for Array:Array Operation

Description

Fill array from another array

Demo Code


Array.from = function(it) {
    var arr = [];
    for (var i = 0; i < it.length; i++) {
        arr[i] = it[i];//from w  ww . j  ava2s. co  m
    }
    return arr;
}

Related Tutorials