Creation

  • Updated

ScriptCollection instances are created using square bracket syntax (‘[‘ and ‘]’); in between the

brackets is specified the initial set of elements in the collection:

var myCollection = [];	// empty collection 
var count = myCollection.Count; // count == 0
myCollection = [ 1.012, 3, 'hello', { Class : 'SomeObject' } ]; 
count = myCollection.Count;	// count == 4
var element = myCollection[2]; // element == ‘hello’

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.