Let's say I have this array:
var myarray = [a, b, c, d, e];
I want to select every element in an array except c.
var myselection = myarray.slice(3,5);
This selects only d and e. I would have to do:
var myselection = myarray.slice(3,5) + myarray.slice(0,2);
This selects d, e, a and b, BUT the output is not used as a selector, since myselection is now written without a comma between e and a: "d, ea, b"
Do you know how to solve this? Maybe with negative numbers?
Many thanks for your help!!! Lee
source share