ablescript/able-script-test/pass-by-reference.able
Alex Bethel d59b75fdb3 Add pass-by-reference test (doesn't work yet)
Also rename the "hello_world.able" test to "hello-world.able" for
consistency.
2021-06-15 09:51:00 -05:00

18 lines
255 B
Plaintext

owo Pass-by-reference test
owo Swap two variables.
functio swap(left, right) {
var tmp = left;
left = right;
right = tmp;
}
var foo = "hello";
var bar = "world";
swap(foo, bar);
owo Should print "hello", then "world"
bar print;
foo print;