Making Lookup Tables with Object Literals
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var info:Object = {city:"Toronto", country:"Canada"};
//The preceding code is identical to the following code:
var info:Object = new Object( );
info.city = "Toronto";
info.country = "Canada";
}
}
}
Related examples in the same category