Examples
Examples
Function
example is used to demonstrate common writing methods of BT and help transition from basic syntax to actual scripts.
Basic script
name = 'BT' println `Hello ${name}`
Function and return value
fn add(a, b) { a + b } println add(1, 2)
Traverse data
for index, value in [1, 2, 3] { println value }
Web return
header('Content-Type', 'application/json') json({ok: true})