]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/sparse_splice.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / sparse_splice.js
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";