Feat: Add standalone if-statement example

This commit is contained in:
2025-09-22 12:51:10 -07:00
parent 50b8acc963
commit 965ba629f0

View File

@@ -208,9 +208,10 @@ grade: (score >= 90) ? { "A" }
: { "D" } : { "D" }
_(grade) // Prints "C" _(grade) // Prints "C"
// Use for side-effects, like a traditional 'if'. // Use as a standalone 'if' for side-effects.
// The return value is discarded. // The block executes if the condition is true; the return value is discarded.
(grade == "C") ? { _("Passable") } isReady: !0
(isReady) ? { _("System is ready.") }
\`\`\` \`\`\`
## Data Structures ## Data Structures