Go ahead, print out a certificate, for this is a special moment! If this is your first Array, then welcome to the wonderful world of data management!
There are actually two ways to create Arrays, and both of those ways allow you to create them with elements in them or not. The first way, which one might consider the official way, looks like this:
- var ary:Array = new Array();
We’re simply creating a variable called ary, of type Array, and setting its value to a new, empty Array. Thenew keyword in ActionScript is one of which you’ll see a lot; as you might infer it creates a free-standing something-or-another, depending on what follows it. In this case, we follow it with the type Array, so we get a new Array.
While this is a perfectly sufficient technique for creating an Array, let’s quickly look at other ways to create an Array.
No comments:
Post a Comment