Skip to content

Commit ab52150

Browse files
authored
Question 34
Perhaps this answer is outdated. I've suggested an answer based on the information from [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof)
1 parent 773dd1b commit ab52150

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,8 +1063,8 @@ console.log(typeof sayHi());
10631063
#### Answer: B
10641064

10651065
The `sayHi` function returns the returned value of the immediately invoked function expression (IIFE). This function returned `0`, which is type `"number"`.
1066-
1067-
FYI: there are only 7 built-in types: `null`, `undefined`, `boolean`, `number`, `string`, `object`, and `symbol`. `"function"` is not a type, since functions are objects, it's of type `"object"`.
1066+
1067+
FYI: `typeof` can return the following list of values: `undefined`, `boolean`, `number`, `bigint`, `string`, `symbol`, `function` and `object`. Note that `typeof null` returns `"object"`.
10681068

10691069
</p>
10701070
</details>

0 commit comments

Comments
 (0)