mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-09-01 21:32:35 +02:00
Update if/else content in JavaScript roadmap (#2162)
Add syntax highlighting in code snippet.
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
```
|
## Example
|
||||||
|
```js
|
||||||
if (condition) {
|
if (condition) {
|
||||||
statement1
|
statement1
|
||||||
} else {
|
} else {
|
||||||
@@ -11,5 +12,5 @@ if (condition) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle>
|
<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://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else'>if...else - MDN docs</BadgeLink>
|
||||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://javascript.info/ifelse'>Conditional branching: if, '?'</BadgeLink>
|
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://javascript.info/ifelse'>Conditional branching: if, '?' - javascript.info</BadgeLink>
|
||||||
|
Reference in New Issue
Block a user