Beginner
JavaScript
Q39 / 100
What is a Symbol in JavaScript?
Correct! Well done.
Incorrect.
The correct answer is B) A primitive value that is always unique, used to create unique property keys
B
Correct Answer
A primitive value that is always unique, used to create unique property keys
Explanation
const sym = Symbol("desc"); creates a unique value. Symbol("a") !== Symbol("a"). Used for unique object property keys and protocol methods like Symbol.iterator.
Progress
39/100