Modules
Using module
use mathputs math.abs(-20) // 20use math, io, taskAlias
use m as 'math'
use my_math as 'this-is-my-custom-math'Creating module
return 100Notes
Last updated
use mathputs math.abs(-20) // 20use math, io, taskuse m as 'math'
use my_math as 'this-is-my-custom-math'return 100Last updated
use my_num
puts my_num // 100func add(a, b) {
return a + b
}
return adduse my_add
puts my_add(3, 4) // 7use math
math = 20
// ^^^^-- This variable is immutable.use 'abc'
// ^^^-- Could not find this module.