1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-30 20:49:49 +02:00

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 <kamranahmed.se@gmail.com>
This commit is contained in:
Ivaylo Karafeizov
2022-09-21 12:20:28 +03:00
committed by GitHub
parent 1c0fd98625
commit de4ea8a57e

View File

@@ -1 +1,15 @@
# If else # 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
}
```
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else'>if...else</BadgeLink>
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://javascript.info/ifelse'>Conditional branching: if, '?'</BadgeLink>