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.
Symbol.for
1 parent 4f50cbf commit 219ad6fCopy full SHA for 219ad6f
test/built-ins/Symbol/for/description.js
@@ -0,0 +1,18 @@
1
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
2
+// This code is governed by the BSD license found in the LICENSE file.
3
+/*---
4
+esid: sec-symbol.for
5
+description: Assigns the string value to the [[Description]] slot
6
+info: |
7
+ 1. Let stringKey be ? ToString(key).
8
+ [...]
9
+ 4. Let newSymbol be a new unique Symbol value whose [[Description]] value
10
+ is stringKey.
11
12
+ 6. Return newSymbol.
13
+features: [Symbol, Symbol.prototype.description]
14
+---*/
15
+
16
+var symbol = Symbol.for({toString: function() { return 'test262'; }});
17
18
+assert.sameValue(symbol.description, 'test262');
0 commit comments