mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-29 03:59:54 +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.
|
||||
|
||||
```
|
||||
## Example
|
||||
```js
|
||||
if (condition) {
|
||||
statement1
|
||||
} else {
|
||||
@@ -11,5 +12,5 @@ if (condition) {
|
||||
```
|
||||
|
||||
<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>
|
||||
<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, '?' - javascript.info</BadgeLink>
|
||||
|
Reference in New Issue
Block a user