Swapping Items in an Array | kirupa.com

by kirupa | 11 January 2015

Arrays in JavaScript are really powerful, really awesome, and really REALLY funny. If you don't feel that way, that's too bad. They are the primary data structure you have for storing and manipulating collections of data, so you are pretty much stuck with them for a very long time. Despite their importance in the JavaScript world, there is a lot of things they don't support out of the box.

This is a companion discussion topic for the original entry at http://www.kirupa.com/html5/swapping_items_array_js.htm