]>
Commit | Line | Data |
---|---|---|
ed1e77d3 A |
1 | var myArray = Array(); |
2 | myArray[ 10000 ] = "a"; | |
3 | myArray[ 10001 ] = "b"; | |
4 | myArray[ 10002 ] = "c"; | |
5 | ||
6 | // remove element at index 1001 | |
7 | myArray.splice( 10001, 1 ); | |
8 | ||
9 | if (myArray[10000] != "a") | |
10 | throw "Splicing Error! start index changed"; | |
11 | if (myArray[10001] != "c") | |
12 | throw "Splicing Error! removed element not removed"; |