Array.js 324 B

12345678910111213141516
  1. load("test-common.js");
  2. try {
  3. assert(Array.length === 1);
  4. assert(Array.prototype.length === 0);
  5. assert(typeof Array() === "object");
  6. assert(typeof new Array() === "object");
  7. x = new Array(5);
  8. assert(x.length === 5);
  9. console.log("PASS");
  10. } catch (e) {
  11. console.log("FAIL: " + e.message);
  12. }