fix(curriculum): correct sentence about the nullish coalesing operator (#63422)

This commit is contained in:
l3onhard
2025-11-02 20:47:01 +01:00
committed by GitHub
parent 982d0fb290
commit 6b4ea540d4
@@ -111,7 +111,7 @@ const result = null ?? 'default';
console.log(result); // default
```
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:
Since `null` is a nullish 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 = {