JavaScripthand handler.set() Method

The handler.set method is an assignment of a value to a property value. The set can be iterator in the insertion order. It is a collection of items which are unique. If an assignment succeeded, then return true. Otherwise, returns false.

An Iterator is an object which defines a sequence and potentially a return value upon its termination.

Syntax

Parameters

target: The target object.

property: Name or Symbol of the property.

value: New value of the property.

receiver: This is usually the proxy itself. A set handler assignment indirectly, via the prototype chain or various other ways.

Return value

Return a Boolean value.

Browser Support

Chrome49
Edge12
Firefox18
Opera36

Example 1

Test it Now

Output:

a= 1 b= 2 c= 30

Example 2

Test it Now

Output:

in set PROXY METHOD

Example 3

Test it Now

Output:

false property set: a = 10





Latest Courses