1
0
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:
puru-khedre
2022-10-12 19:23:03 +05:30
committed by GitHub
parent 587772e38f
commit f95471b31d

View File

@@ -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>