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.
26 lines
362 B
26 lines
362 B
7 years ago
|
/*
|
||
|
* Create Object using a literal
|
||
|
*/
|
||
|
|
||
|
if (typeof print !== 'function') { print = console.log; }
|
||
|
|
||
|
function test() {
|
||
|
var obj;
|
||
|
var i;
|
||
|
|
||
|
for (i = 0; i < 1e6; i++) {
|
||
|
obj = {
|
||
|
key1: 'val1',
|
||
|
key2: 'val2',
|
||
|
key3: 'val3'
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
|
||
|
try {
|
||
|
test();
|
||
|
} catch (e) {
|
||
|
print(e.stack || e);
|
||
|
throw e;
|
||
|
}
|