How to mutate an immutable array
-
For an application in QML, I needed a way to mutate an immutable array. I'm not a Javascript expert, so it took me about a day to work out the solution. The implementation is surprisingly small.
I put an explanation and the code in the Wiki: "Mutate immutable arrays in Javascript":http://developer.qt.nokia.com/wiki/Mutate-immutable-arrays-in-javascript