Data Actions
Data actions help you work with variables, perform calculations, and manage the state of your app.
Setting Variables
set
Assigns a value to a variable:
set $name = "Alice"
set $age = 25
set $logged-in = true
Calculations
calc
Performs mathematical operations:
calc $total = $price * $quantity
calc $discount = $total * 0.1
calc $final = $total - $discount
Working with Lists
append
Adds items to a list:
append $shopping-list = "Milk"
append $shopping-list = "Bread"
remove
Removes items from a list:
remove $shopping-list = "Milk"
Data Conversion
Convert between different data types:
set $number = 42
set $text = "$number" // Converts to string
More content coming soon…