This documentation is currently being moved to our new documentation site.

Please view or edit the documentation there, instead.

If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

fluid.clear

fluid.clear(target)

Clears an object or array of its contents. For objects, each property is deleted.

fluid.clear(target);

File name: Fluid.js

Parameters

target (Object or Array) Either an object or an array whose contents you wish to clear

Return Value

None

See Also


Example

var obj = {
  foo: "bar",
  bar: {
    bat: "CATT"
  }
};
fluid.clear(obj);

After the call to fluid.clear(), the object obj will be an empty object, i.e. {}.