clear

Removes all things from a set.

This function generates a change (except when called on a variable).

Function

set.clear()

Return value

Returns nil.

Example

This code adds things to a set:

a = {item: 'a'};
b = {item: 'b'};
s = set(a, b);

s.clear();
s;  // the set is empty

Return value in JSON format

[]