What is the output?
console.log(typeof class {}, typeof Symbol());
- class symbol
- function symbol
- object symbol
- function string
Classes are functions under the hood, and Symbol() returns a primitive of type symbol.
Play Problem Solving ▸
console.log(typeof class {}, typeof Symbol());