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’
Comments
0 comments
Please sign in to leave a comment.