Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Div
classapi-page

fluid.clear(target)

Section
Column
width70%

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

Code Block
javascript
javascript
bgColorwhite
borderStylenonejavascript
fluid.clear(target);

File name: Fluid.js

Parameters

Span
classborderless-table

target

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

Return Value

Span
classborderless-table

None

Column
width5%

Column

See Also


Example

Code Block
javascript
javascript
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. {}.