From de4ea8a57e1b18f4936317e04df9017582f0cca1 Mon Sep 17 00:00:00 2001 From: Ivaylo Karafeizov Date: Wed, 21 Sep 2022 12:20:28 +0300 Subject: [PATCH] Update 100-if-else.md (#1821) * Update 100-if-else.md * Update content/roadmaps/106-javascript/content/107-javascript-control-flow/101-conditional-statements/100-if-else.md Co-authored-by: Kamran Ahmed --- .../101-conditional-statements/100-if-else.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/content/roadmaps/106-javascript/content/107-javascript-control-flow/101-conditional-statements/100-if-else.md b/content/roadmaps/106-javascript/content/107-javascript-control-flow/101-conditional-statements/100-if-else.md index e549e8124..1825151f9 100644 --- a/content/roadmaps/106-javascript/content/107-javascript-control-flow/101-conditional-statements/100-if-else.md +++ b/content/roadmaps/106-javascript/content/107-javascript-control-flow/101-conditional-statements/100-if-else.md @@ -1 +1,15 @@ -# If else \ No newline at end of file +# If else + +The `if` statement executes a statement if a specified condition is `truthy`. If the condition is `falsy`, another statement in the optional `else` clause will be executed. + +``` +if (condition) { + statement1 +} else { + statement2 +} +``` + +Free Content +if...else +Conditional branching: if, '?'