Creates a shallow clone of the array.

@param  {Array} arr Array to clone
@return {Array}     Array cloned
164962
function arrayClone(arr) {
        var clone = new Array(arr.length);

        this._forEach(arr, function (el, i) {
            clone[i] = el;
        });

        return clone;
    }
1107860
function(arr, func) {
	
	if (arr.map) { return arr.map(func); }
	
	var i, l,
		r = [];
	
	for (i=0, l=arr.length; i<l; i++) {
		r.push(func(arr[i]));
	}
	return r;
}
1350044
function cloneArray(a) {
    var b = [], i = a.length
    while (i--) b[ i ] = a[ i ]
    return b
}
377074
function _shallowCopy(component) {
        var clone = {},
            property;

        for (property in component) {
            if (component.hasOwnProperty(property)) {
                clone[property] = component[property];
            }
        }

        return clone;
    }
737778
function (arr) {
        this.array[0] = arr[0];
        this.array[1] = arr[1];
        this.array[2] = arr[2];
        this.array[3] = arr[3];

        this._dirty = true;
        return this;
    }
848158
private Set<Integer> arrayToSet(int[] arr) {
        Set<Integer> s = new HashSet<Integer>();
        for (int value : arr)
            s.add(value);
        return s;
    }
738621
protected Object newArray(Object old, int oldLen, Object arr)
    {
        int sb = Math.floorMod(begin, oldLen);
        int se = Math.floorMod(end, oldLen);
        if (sb < se)
        {
            System.arraycopy(old, sb, arr, sb, se - sb);
        }
        else
        {
            System.arraycopy(old, sb, arr, sb, oldLen - sb);
            System.arraycopy(old, 0, arr, 0, se);
        }
        return arr;
    }
1090695
function copyOntoArray(a1, a2) {
  for (let i = 0; i < a2.length; i++) {
    a1[i] = a2[i];
  }
  a1.length = a2.length;
  return a1;
}
346151
function cloneArrayBuffer(arrayBuffer) {
    var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
    new Uint8Array(result).set(new Uint8Array(arrayBuffer));
    return result;
  }
368518
function clone(value, deep) {
    if (Array.isArray(value)) {
      if (deep) {
        return value.map(function(value) {
          return clone(value, deep);
        });
      } else {
        return value.slice();
      }
    } else if (value && typeof value === 'object') {
      if (value.valueOf() !== value) {
        return new value.constructor(value.valueOf());
      } else {
        var copy = {};
        for (var key in value) {
          var objValue = value[key];
          if (deep) {
            objValue = clone(objValue, deep);
          }
          copy[key] = objValue;
        }
        return copy;
      }
    } else {
      return value;
    }
  }
920225
function (arr) {
    var hash = {}
    var result = []
    for (var i = 0, l = arr.length; i < l; ++i) {
      if (!hash.hasOwnProperty(arr[i])) {
        hash[arr[i]] = true
        result.push(arr[i])
      }
    }
    return result
  }
330397
function() {
      var i        = 0,
          length   = arr.length,
          newArray = [];
      for (; i<length; i++) {
        newArray.push(arr[i]);
      }
      return newArray;
    }
1300482
public static Object[] appendArray(Object[] arr, Object obj) {
		Object[] newArr = new Object[arr.length + 1];
		System.arraycopy(arr, 0, newArr, 0, arr.length);
		newArr[arr.length] = obj;
		return newArr;
	}
1182170
function clone(obj) {
    if (typeof obj !== 'object') {
        return obj;
    }
    var ret;
    if (util.isArray(obj)) {
        ret = [];
        obj.forEach(function (val) {
            ret.push(clone(val));
        });
        return ret;
    }
    ret = {};
    Object.keys(obj).forEach(function (key) {
        ret[key] = clone(obj[key]);
    });
    return ret;
}
805949
function arrayToList ( arr ) {
	const length = arr.length;
	const data = new types.List(length);
	for ( let i = 0; i < length; i++ ) {
		data.setValue(i, setJsonValueToSassValue(arr[i]));
	}
	return data;
}
957053
function clone(a) {
    var out = new Float32Array(3)
    out[0] = a[0]
    out[1] = a[1]
    out[2] = a[2]
    return out
}
398358
public static function rearrangePostedFiles($arr)
    {
        $new = array();
        foreach ($arr as $key => $all) {
            if (is_array($all)) {
                foreach ($all as $i => $val) {
                    $new[$i][$key] = $val;
                }
            } else {
                $new[0][$key] = $all;
            }
        }

        return $new;
    }