set

fun set(target: Any, propertyKey: PropertyKey, value: Any?): Boolean(source)

Sets the property of target, equivalent to target[propertyKey] = value when receiver === target.

Parameters

target

Object that contains the property on itself or in its prototype chain.

propertyKey

Name of the property.