fix(curriculum): typo falsey instead of falsy (#60706)

This commit is contained in:
Clarence Bakosi
2025-06-04 14:22:17 +01:00
committed by GitHub
parent 0fe9cc721d
commit 26e45cd6e9
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ const result = false && 0;
console.log(result); // false
```
Since `false` is a falsey value, then `false` is logged to the console. The logical AND operator is useful when you want to check multiple conditions and ensure that all are true before proceeding. Here is an example:
Since `false` is a falsy value, then `false` is logged to the console. The logical AND operator is useful when you want to check multiple conditions and ensure that all are true before proceeding. Here is an example:
```js
if (2 < 3 && 3 < 4) {
@@ -90,7 +90,7 @@ const result = null ?? 'default';
console.log(result); // default
```
Since `null` is a falsey value, the string `default` would be logged to the console. The nullish coalescing operator is incredibly useful in situations where `null` or `undefined` are the only values that should trigger a fallback or default value. Here is an example of dealing with a user's preference settings:
Since `null` is a falsy value, the string `default` would be logged to the console. The nullish coalescing operator is incredibly useful in situations where `null` or `undefined` are the only values that should trigger a fallback or default value. Here is an example of dealing with a user's preference settings:
```js
const userSettings = {

View File

@@ -35,7 +35,7 @@ try {
}
```
When you click your `checkMessageButton` and the `isSpam(messageInput.value)` is falsey, you should set the `textContent` property of `result` to `"This message does not seem to contain any spam."`.
When you click your `checkMessageButton` and the `isSpam(messageInput.value)` is falsy, you should set the `textContent` property of `result` to `"This message does not seem to contain any spam."`.
```js
messageInput.value = "spam";