Guest User

Untitled

a guest
Oct 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. var list : List;
  2. var bday : Object = {day: 30, month: 04, year: 1990};
  3.  
  4. public function diff_viewer_main()
  5. {
  6. list = new List;
  7. list.add("nome", "Rafael");
  8. list.add("idade", 21);
  9. list.add("nascimento", bday);
  10. trace(list.item("nome")); // Rafael
  11. trace(list.item("idade")); // 21
  12. trace(list.item("nascimento").year); // 1990
  13. trace(list.match(bday)); // true
  14. trace(list.match("nome")); // true
  15. trace(list.match("Rafael")); // true
  16. trace(list.match("testing")); // false
  17. trace(list.match(21)); // true
  18. list.remove("idade");
  19. trace(list.item("idade")); // null
  20. }
Add Comment
Please, Sign In to add comment