rhai/scripts/function_decl1.rhai

10 lines
149 B
JavaScript
Raw Normal View History

2022-01-20 05:06:36 +01:00
// This script defines a function and calls it.
2020-03-16 07:50:12 +01:00
2022-01-20 05:06:36 +01:00
fn call_me() {
2020-03-16 07:50:12 +01:00
return 3;
2016-03-02 03:36:46 +01:00
}
2022-01-20 05:06:36 +01:00
let result = call_me();
2020-05-02 10:23:36 +02:00
2022-01-20 05:06:36 +01:00
print(`call_me() should be 3: ${result}`);