I know something is wrong with the second function but I don't know what!
var objects = new Array();
objects[w] = new obj();
objects[i] = .concat(objects.slice(0,i),objects.slice(-i-1));
Thank you so much in advance!