Espruino/tests/test018.js
Gordon Williams f3d6e0bc83 First commit
2013-09-26 14:39:04 +01:00

19 lines
194 B
JavaScript

// references with functions
var a = 42;
var b = [];
b[0] = 43;
function foo(myarray) {
myarray[0]++;
}
function bar(myvalue) {
myvalue++;
}
foo(b);
bar(a);
result = a==42 && b[0]==44;