Espruino/tests/test_new_array_from_constructor.js
Michael Duerinckx 7f5308590b Rename numbered tests to something more descriptive - closes #16
test077 is the only one I really couldn't figure out what it was meant
to test.
2014-03-01 22:15:28 +00:00

10 lines
250 B
JavaScript

// New array from constructor
var a = new Array();
var b = new Array(5);
var c = new Array(7,8,9,10);
if (false) var b = new Array(10); // test for something that would have broken here
a.push(5);
b.push(6);
result = a[0]==5 && b[5]==6 && c[1]==8;