Files

8 lines
509 B
Markdown
Raw Permalink Normal View History

2026-06-12 11:06:50 +02:00
# if...else
The `if...else` statement executes a block of code if a condition is true, and an optional `else` block if it is false. Additional conditions can be checked with `else if`. It is the most basic form of conditional logic in JavaScript.
2023-01-02 04:47:46 +04:00
Visit the following resources to learn more:
2024-06-06 23:23:55 +01:00
- [@article@if...else - MDN docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else)
2026-06-12 11:06:50 +02:00
- [@article@Conditional branching: if, ? - javascript.info](https://javascript.info/ifelse)