Built-in Variables
current
current
is a built in variable that can be used with other functions that handle lists. It will be replaced by the value specified for each item in a list.
index
index
is similar to current
, but instead returns a number that corresponds to each item’s place in a list. Note that this number is zero-index, so the first item in a list will return 0
.
User-defined Variables
The new let()
and lets()
functions allow you to assign values to variables and then use those variables in an expression. let
will allow for one variable to be creates, while lets
allows for multiple variables to be set.
Note that the resulting variables can only be used between the brackets of the original let()
or lets()
function.