Update if/else content in JavaScript roadmap (#2162)

Add syntax highlighting in code snippet.
pull/2435/head
puru-khedre 2 years ago committed by GitHub
parent 587772e38f
commit f95471b31d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      content/roadmaps/106-javascript/content/107-javascript-control-flow/101-conditional-statements/100-if-else.md

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

Loading…
Cancel
Save