Skip to main content
Version: 4.0.1

Map.prototype.set()

The set() method adds or updates an entry in a Map object with a specified key and a value.

Syntax​

set(key, value)

Parameters​

Return value​

The Map object.