Adds an item to the collection at the specified index.
Namespace: MindFusion.Common.Collections
File: ObservableCollection.js
JavaScript Copy Code |
---|
function insert (index, item) |
Number. The index.
Object. The object to add.
The following code creates a List with products. Then it adds several products to it and inserts one at the beginning of the List. List derives from ObservableCollection.
JavaScript Copy Code |
---|
var product1 = new Object(); var product2 = new Object(); List products = new List();
if(products.count() > 100) |