mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
342 B
20 lines
342 B
/*
|
|
* Development time bug caused by too lenient string-to-array-index
|
|
* conversion.
|
|
*/
|
|
|
|
/*===
|
|
quux
|
|
quux
|
|
undefined
|
|
===*/
|
|
|
|
try {
|
|
var arr = [ 'foo', 'bar', 'quux', 'baz' ];
|
|
print(arr[2]);
|
|
print(arr['2']);
|
|
print(arr['02']); // should be undefined, '02' is not an array index compatible string
|
|
} catch (e) {
|
|
print(e);
|
|
}
|
|
|
|
|