Node.js examples for Array:Array Value
Writes one array into another, and saves the old content
function exchangeArrays(aFrom, aTo, offs) { var u, len = aFrom.length; for(var i=0; i < len; i++, offs++){ u = aTo[offs];// www . j a v a 2 s. c o m aTo[offs] = aFrom[i]; aFrom[i] = u; } }