Espruino/tests/test_array_push_pop.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
169 B
JavaScript

// array push and pop
var a = [];
var b = ["foo"];
var c = [];
c.push(42);
result = a.push("x")==1 && b.pop()=="foo" && b.length == 0 && c.push(2)==2 && c.length==2;