Created
August 26, 2014 09:05
-
-
Save riston/a4e8ff89f18648e5b43c to your computer and use it in GitHub Desktop.
Immutable origin array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = [1,2,3] | |
// Using lodash or underscore | |
var b = _.clone(a); | |
var c = Array.prototype.slice.call(a, 0); | |
var d = a.concat() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment