mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-04-08 12:30:56 +01:00
Update syntax-if-statements-initializers.md
This commit is contained in:
parent
7615e25ed0
commit
33a5933eb9
1 changed files with 2 additions and 1 deletions
|
@ -50,7 +50,7 @@ end
|
||||||
|
|
||||||
`Output: true`
|
`Output: true`
|
||||||
|
|
||||||
When declaring multiple values inside of a condition, only the first condition will be evaluated.
|
When declaring multiple values inside of a condition, all of the variables will be evaluated.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ local function foo()
|
||||||
end
|
end
|
||||||
|
|
||||||
if local a,b = foo() then
|
if local a,b = foo() then
|
||||||
|
else
|
||||||
print'Hello World, from Luau!'
|
print'Hello World, from Luau!'
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue