attach functions to objects

First declare your objects

Then you declare a function…

You can literally attach functions to objects like so:

Where the function uses ‘this’ to access the calling object’s attributes.
Using them like this:

would give:

name is: gary, age is: 25
name is: ricky, age is: 35