Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var nico:Object = new Object();
- nico.isNice = true;
- nico.colorEyes = "red";
- nico.gender = 'm';
- // Only values:
- for each(var value:Object in nico) {
- trace(value);
- }
- // only keys:
- for(var key:Object in nico) {
- trace(key);
- }
- // Combined:
- for(var key2:Object in nico) { // Variable named key2 b/c the as3 compiler is the worst ever.
- trace(key2 + " has value " + nico[key2]);
- }
Advertisement
Add Comment
Please, Sign In to add comment