//Array.prototype[0] = 999
//Array.prototype[1] = 998
//Array.prototype[3] = 997
//Array.prototype[5] = 996
//Array.prototype[7] = 995
//var a = new Array(8)
//a[2] = 2
//a[4] = 4
//a[6] = 6
//var b = a.splice();
//(contents of a)
999
998
2
997
4
996
6
995
//b
undefined
//var a = new Array(8)
//a[2] = 2
//a[4] = 4
//a[6] = 6
//var c = a.splice(0, 3, "test1", "test2");
//(contents of a)
test1
test2
997
4
996
6
995
//(contents of c)
999
998
2
//var a = new Array(8)
//a[2] = 2
//a[4] = 4
//a[6] = 6
//var d = a.splice(-1, 3, "test3", "test4");
//(contents of a)
999
998
2
997
4
996
6
test3
test4
//(contents of d)
995
//var a = new Array(8)
//a[2] = 2
//a[4] = 4
//a[6] = 6
//var e = a.splice(-3, 3, "test5", "test6");
//(contents of a)
999
998
2
997
4
test5
test6
//(contents of e)
996
6
995
//var a = new Array(8)
//a[2] = 2
//a[4] = 4
//a[6] = 6
//var e = a.splice(20, 0 "test7");
//(contents of a)
999
998
2
997
4
996
6
995
test7
//(contents of e)
//var a = new Array(8)
//a[2] = 2
//a[4] = 4
//a[6] = 6
//var f = a.splice(2);
//(contents of a)
999
998
//(contents of f)
2
997
4
996
6
995
//var a = new Array(8)
//a[2] = 2
//a[4] = 4
//a[6] = 6
//Array.prototype[0] = 99
//Array.prototype[5] = 96
//Array.prototype[7] = 95
//(contents of a)
99
998
2
997
4
96
6
95
//(contents of c)
999
998
2
//(contents of d)
995
//(contents of e)
//(contents of f)
2
997
4
996
6
995
