Variables in objects

How come I never knew the following?
I’ve got a lot on fun ahead of me.

var myObject = {
firstname: “Patrick”,
lastname: “Wall”
getlastname: function(){return this.lastname;}
}
trace(myObject.firstname);
trace(myObject.getlastname());

Leave a comment

name*

email* (not published)

website