Skip to content

Instantly share code, notes, and snippets.

@mbolt35
Created November 1, 2012 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbolt35/3991248 to your computer and use it in GitHub Desktop.
Save mbolt35/3991248 to your computer and use it in GitHub Desktop.
// These produce the same Array *structure*, they are not
// strictly equivalent (===)
var oneWay:Array = new Array(1, 2, 3);
var anotherWay:Array = [ 1, 2, 3 ];
// Each of these result with the same Vector.<int>
// *structure*, however they are not strictly
// equivalent (===).
var v1:Vector.<int> = new Vector.<int>(3);
v1[0] = 1; v1[1] = 2; v1[2] = 3;
var v2:Vector.<int> = new <int>[ 1, 2, 3 ];
var v3:Vector.<int> = Vector.<int>([ 1, 2, 3 ]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment