Reputation: 752
I am trying to reorganize an array to use it in a for loop. I have tried slicing it then merging with sliced elements but i get the error
TypeError: images.slice(...).merge is not a function
Here is an example of what I am trying
var images = ["0", "1", "2", "3", "4", "5"];
var f_iamges = images.slice(2).merge(images.slice(0, 2))
console.log(f_iamges)
I expected output ["2", "3", "4", "5", "0", "1"]
I also want the original copy to remain unchanged.
Upvotes: 0
Views: 106