MindFusion.Charting for JavaScript Programmer's Guide
ObservableCollection.clear Method
See Also
Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: None Language Filter: C# Language Filter: Visual Basic Language Filter: Java Language Filter: JavaScript Language Filter: C++ Language Filter: XAML

C#
Visual Basic
Java
JavaScript
C++
XAML

Clears the collection.

Namespace: MindFusion.Common.Collections
File: ObservableCollection.js

## Syntax

JavaScript Copy Code
function clear ()

## Example

The following code checks if the count of items in the collection is more than 100 and if so, clears the collection:

JavaScript Copy Code
var products = new ObservableCollection([product1, product2, ...]); ..... ..... if(products.count() > 100) products.clear();

## See Also

ObservableCollection Members
ObservableCollection Class
MindFusion.Common.Collections Namespace