function moveCoords(coords, dx, dy) {
  var newCoords = new Array(coords.length);
  for (var i = 0; i < coords.length; i++) {
    newCoords[i] = [coords[i][0] + dx, coords[i][1] + dy];
  }
  return newCoords;
}
// Returns a new list of coordinates, does not modify the original list.
Returns a new list of coordinates, does not modify the original list.
Returns a new list of coordinates does not modify the original list .
function moveCoords(coords, dx, dy) {
  var newCoords = new Array(coords.length);
  for (var i = 0; i < coords.length; i++) {
    newCoords[i] = [coords[i][0] + dx, coords[i][1] + dy];
  }
  return newCoords;
}
function moveCoords ( coords , dx , dy ) { var newCoords = new Array ( coords . length ) ; for ( var i = 0 ; i < coords . length ; i ++ ) { newCoords [ i ] = [ coords [ i ] [ 0 ] + dx , coords [ i ] [ 1 ] + dy ] ; } return newCoords ; }
Returns a new list of coordinates, does not modify the original list.
Returns a new list of coordinates does not modify the original list .