WeakMap.prototype.set

Adds a new element with a specified key and value to a WeakMap object.

The key must be an object or a non-registered symbol, and the value can be arbitrary.

Syntax

set(key, value)

Parameters