Created
March 23, 2015 06:58
-
-
Save bananaumai/cc2f4d90662aa823ce9e to your computer and use it in GitHub Desktop.
lodashのcloneを用いた実装
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 _ = require('lodash'); | |
function iPush(arr, val) { | |
var arr2 = _.clone(arr); | |
arr2.push(val); | |
return arr2; | |
} | |
var arr = []; | |
for (var i = 0; i < 100000; i++) { | |
arr = iPush(arr, i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment