From 6e28eff296844c9c845414907a27fc7791140029 Mon Sep 17 00:00:00 2001 From: Flipez Date: Mon, 27 Nov 2023 22:15:49 +0100 Subject: [PATCH] docs(if): add documentation for if/elif/else Signed-off-by: Flipez --- docs/docs/control_expressions/if.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/docs/control_expressions/if.md b/docs/docs/control_expressions/if.md index 02ecd12..5c268f8 100644 --- a/docs/docs/control_expressions/if.md +++ b/docs/docs/control_expressions/if.md @@ -1,19 +1,26 @@ --- -title: "If" +title: "If / elif / else" menu: docs: parent: "controls" --- +import CodeBlockSimple from '@site/components/CodeBlockSimple' + # If With `if` and `else` keywords the flow of a program can be controlled. -```js -🚀 > if (a.type() == "STRING") - puts("is a string") + + +# Elif +`elif` allows providing of an additional consequence check after `if` and before evaluating the alternative provided by `else`. There is no limit on how many `elif` statements can be used. -// which prints -is a string -``` \ No newline at end of file + \ No newline at end of file