Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Logic problem
Message
 
 
General information
Forum:
Javascript
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01652713
Message ID:
01652736
Views:
48
>Assume the array is : A B C D E F and you want to move B and C down 1 position.
>After the first move_element you will have A C B D E F
>Now when moving C you will be back to having : A B C D E F
>
>For it to work you would need to iterate the array in reverse order when moving down.

Yes, I was thinking exactly that, but it means I can not use the forEach?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform