clear

Removes all properties from a thing.

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

Function

thing.clear()

Return value

Returns nil.

Example

This code adds things to a set:

my_thing = {
    a: 'Property A',
    b: 'Property B',
    c: 'Property C'
};

my_thing.clear();
my_thing;  // the thing is empty

Return value in JSON format

{}