awtk/tests/fscripts/demo_function2.fs
2021-08-26 07:40:37 +08:00

31 lines
344 B
GLSL

function f1() {
var a = 10;
var b = 20;
var c = a + b;
return c;
}
assert(f1() == 30);
function f2() {
var a = 10;
var b = 20;
return a + b;
}
assert(f2() == 30);
function f3() {
var a = 10;
var b = 20;
return (a + b);
}
assert(f3() == 30);
function f4() {
var a = 10;
var b = 20;
return 30
}
assert(f4() == 30);