diff --git a/files/en-us/web/javascript/reference/global_objects/symbol/index.md b/files/en-us/web/javascript/reference/global_objects/symbol/index.md index db9b736bec8fcea..7c5d214f9938448 100644 --- a/files/en-us/web/javascript/reference/global_objects/symbol/index.md +++ b/files/en-us/web/javascript/reference/global_objects/symbol/index.md @@ -66,7 +66,7 @@ All static properties of the `Symbol` constructor are Symbols themselves, whose Prior to well-known Symbols, JavaScript used normal properties to implement certain built-in operations. For example, the [`JSON.stringify`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) function will attempt to call each object's `toJSON()` method, and the [`String`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/String) function will call the object's `toString()` and `valueOf()` methods. However, as more operations are added to the language, designating each operation a "magic property" can break backward compatibility and make the language's behavior harder to reason with. Well-known Symbols allow the customizations to be "invisible" from normal code, which typically only read string properties. -> **Note:** The spec used to use the notation `@@symbol` to denote well-known symbols. For example, {{jsxref("Symbol.hasInstance")}} was written as `@@hasInstance`, and the `Array.prototype[Symbol.iterator]()` method would be called `Array.prototype[@@iterator]()`. This notation is no longer used in the spec, but you may still see it in older documentation or discussions. +> **Note:** The spec used to use the notation `@@` to denote well-known symbols. For example, {{jsxref("Symbol.hasInstance")}} was written as `@@hasInstance`, and the `Array.prototype[Symbol.iterator]()` method would be called `Array.prototype[@@iterator]()`. This notation is no longer used in the spec, but you may still see it in older documentation or discussions. Well-known symbols do not have the concept of garbage collectability, because they come in a fixed set and are unique throughout the lifetime of the program, similar to intrinsic objects such as `Array.prototype`, so they are also allowed in {{jsxref("WeakMap")}}, {{jsxref("WeakSet")}}, {{jsxref("WeakRef")}}, and {{jsxref("FinalizationRegistry")}} objects. diff --git a/files/en-us/web/javascript/reference/global_objects/symbol/isconcatspreadable/index.md b/files/en-us/web/javascript/reference/global_objects/symbol/isconcatspreadable/index.md index d2f29a321bbde2e..29c32754cf54943 100644 --- a/files/en-us/web/javascript/reference/global_objects/symbol/isconcatspreadable/index.md +++ b/files/en-us/web/javascript/reference/global_objects/symbol/isconcatspreadable/index.md @@ -19,7 +19,7 @@ The well-known symbol `Symbol.isConcatSpreadable`. ## Description -The `[Symbol.isConcatSpreadable]` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects: +The `[Symbol.isConcatSpreadable]` property can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects: - For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases. - For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases. diff --git a/files/en-us/web/javascript/reference/global_objects/weakmap/weakmap/index.md b/files/en-us/web/javascript/reference/global_objects/weakmap/weakmap/index.md index f5679abc05c4be3..8a502064460a8bb 100644 --- a/files/en-us/web/javascript/reference/global_objects/weakmap/weakmap/index.md +++ b/files/en-us/web/javascript/reference/global_objects/weakmap/weakmap/index.md @@ -21,7 +21,7 @@ new WeakMap(iterable) ### Parameters - `iterable` - - : An [`Array`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) or other iterable object that implements an [Symbol.iterator](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/@@iterator) method that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined. + - : An [`Array`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) or other [iterable object](<(/en-US/docs/Web/JavaScript/Reference/Iteration_protocols)>) that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined. ## Examples