Removes a single item from an array and returns it without creating gc, like the native splice does. Based on code by Mike Reinstein.
name | type | description |
---|---|---|
array | array |
The array to splice from. |
index | number |
The index of the item which should be spliced. |
The item which was spliced (removed).