Skip to content

Commit 0c17a4a

Browse files
authoredOct 2, 2023
Do corrections to the if-then statement example code (Roblox#171)
## Changes The example code snippet demonstrates an "if-then" block which is incorrectly commented. Corrected the comments. ## Checks By submitting your pull request for review, you agree to the following: - [x] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [x] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [x] To the best of my knowledge, all proposed changes are accurate.
1 parent 268559a commit 0c17a4a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
 

‎content/en-us/luau/control-structures.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ In a chain of `if`, `elseif`, and `else` conditions, Luau tests conditions from
2424
if 2 + 2 == 5 then
2525
print("Two plus two is five") -- Doesn't print because the condition is false
2626
elseif 2 + 3 == 5 then
27-
print("Two plus three is five") -- Doesn't print because the condition is false
28-
else
29-
print("What is two plus two?") -- What is two plus two?
30-
end
31-
32-
if 2 + 3 == 5 then
3327
print("Two plus three is five") -- Two plus three is five
28+
else
29+
print("All conditions failed") -- Doesn't print because the previous condition is true
3430
end
3531
```
3632

0 commit comments

Comments
 (0)
Please sign in to comment.