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.
24 lines
449 B
24 lines
449 B
/*
|
|
* Create Array using a literal
|
|
*/
|
|
|
|
if (typeof print !== 'function') { print = console.log; }
|
|
|
|
function test() {
|
|
var arr;
|
|
var i;
|
|
|
|
for (i = 0; i < 1e6; i++) {
|
|
arr = [ 'foo', 'bar', 'quux', 'baz', 'quuux',
|
|
'1', '2', '3', '4', '5',
|
|
'foo', 'bar', 'quux', 'baz', 'quuux',
|
|
'1', '2', '3', '4', '5' ];
|
|
}
|
|
}
|
|
|
|
try {
|
|
test();
|
|
} catch (e) {
|
|
print(e.stack || e);
|
|
throw e;
|
|
}
|
|
|