Add support of array initialization like [1,,,'4']

This commit is contained in:
Ilmir Usmanov
2014-09-30 19:44:45 +04:00
parent 9d129e15dc
commit 6561c3fe6c
3 changed files with 23 additions and 1 deletions
+6
View File
@@ -71,3 +71,9 @@ assert(Array.prototype.length === 0);
Array.prototype[0] = 'string value';
assert(Array.prototype.length === 1);
assert(Array.prototype[0] === 'string value');
var c = [0,,,'3'];
assert (c[0] === 0);
assert (c[1] === undefined);
assert (c[2] === undefined);
assert (c[3] === '3');