We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0e4cb1 commit 0fbc9deCopy full SHA for 0fbc9de
symbols.js
@@ -0,0 +1,13 @@
1
+// Symbols in JavaScript
2
+
3
+// Defining Symbol 1
4
+const sym1 = Symbol();
5
6
+// Defining Symbol 2
7
+const sym2 = Symbol();
8
9
+// Checking whether the symbols are equal
10
+console.log(
11
+ "Both 'sym1' and 'sym2' are undefined but they are not equal because symbols are always unique"
12
+);
13
+console.log(sym1 === sym2);
0 commit comments