Search
ObservableCollection.clear Method
See Also
 






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