Introduction to the Symbol type in JavaScript
The Symbol type is designed to
create unique identifiers. These
identifiers can be used to create
unique object keys.
Let's create a symbol as an example:
javascriptlet sym = Symbol();
console.log(sym);
You can create several symbols:
javascriptlet sym1 = Symbol();
let sym2 = Symbol();
console.log(sym1, sym2);
The symbols we create will be unique. This means that when compared, they will not be equal:
javascriptlet sym1 = Symbol();
let sym2 = Symbol();
console.log(sym1 === sym2); // false
Задание 1
Create several symbols.