D
David
Is there an effecient way to move an array entry up or down in the array?
For example. Say you have an array of 5 entries. They are all strings by the
way.
myArray = ("entry0","entry1","entry2","entry3","entry4");
What is needed is a mechanism/function to move any of the array entries up
or down in the array. I have been trying by first splice(selectedEntry) out
of the Array, then a couple of slice() and then concat() them all back
together but this seems very clumsy.
Does anyone know of a more elegant way to accomplish this?
Regards,
David J.
For example. Say you have an array of 5 entries. They are all strings by the
way.
myArray = ("entry0","entry1","entry2","entry3","entry4");
What is needed is a mechanism/function to move any of the array entries up
or down in the array. I have been trying by first splice(selectedEntry) out
of the Array, then a couple of slice() and then concat() them all back
together but this seems very clumsy.
Does anyone know of a more elegant way to accomplish this?
Regards,
David J.