.add()
The .add()
method inserts a value into a Set
(if it is unique) and returns the updated Set
object.
Syntax
set.add(value);
The value
in set
is unique and of a valid data type.
The .add()
method inserts a value into a Set
(if it is unique) and returns the updated Set
object.
set.add(value);
The value
in set
is unique and of a valid data type.