mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(curriculum): wrap output strings in double quotes (#58880)
This commit is contained in:
parent
33bbe1192f
commit
452adc7d08
@ -195,17 +195,17 @@ error = "Not Found"; // This would cause an error in Java
|
||||
|
||||
```js
|
||||
let age = 25;
|
||||
console.log(typeof age); // number
|
||||
console.log(typeof age); // "number"
|
||||
|
||||
let isLoggedin = true;
|
||||
console.log(typeof isLoggedin); // boolean
|
||||
console.log(typeof isLoggedin); // "boolean"
|
||||
```
|
||||
|
||||
- However, there's a well-known quirk in JavaScript when it comes to `null`. The `typeof` operator returns `object` for `null` values.
|
||||
- However, there's a well-known quirk in JavaScript when it comes to `null`. The `typeof` operator returns `"object"` for `null` values.
|
||||
|
||||
```js
|
||||
let user = null;
|
||||
console.log(typeof user); // object
|
||||
console.log(typeof user); // "object"
|
||||
```
|
||||
|
||||
# --assignment--
|
||||
|
||||
Loading…
Reference in New Issue
Block a user