Skip to main content
Version: 3.28.0

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.