mirror of
https://github.com/typst/typst
synced 2025-05-22 13:05:29 +08:00
Rephrase the sentence on variable scope in Scripting documentation (#4250)
This commit is contained in:
parent
1fff04f582
commit
4929262610
@ -68,8 +68,9 @@ As already demonstrated above, variables can be defined with `{let}` bindings.
|
||||
The variable is assigned the value of the expression that follows the `=` sign.
|
||||
The assignment of a value is optional, if no value is assigned, the variable
|
||||
will be initialized as `{none}`. The `{let}` keyword can also be used to create
|
||||
a [custom named function]($function/#defining-functions). Let bindings can be
|
||||
accessed for the rest of the containing block or document.
|
||||
a [custom named function]($function/#defining-functions). Variables can be
|
||||
accessed for the rest of the containing block (or the rest of the file if there
|
||||
is no containing block).
|
||||
|
||||
```example
|
||||
#let name = "Typst"
|
||||
|
Loading…
x
Reference in New Issue
Block a user