mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-30 12:40:03 +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:
committed by
GitHub
parent
1c0fd98625
commit
de4ea8a57e
@@ -1 +1,15 @@
|
||||
# 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>
|
||||
|
Reference in New Issue
Block a user