Challenge

This was a tough chapter. If you’d like a challenge to make sure you understand how to add methods to prototypes, give this a try.

Can you define an about() function on the Movie.prototype that returns the same information as about() from bestMovie? Then have logMe() log the results from this.about().

If you can get that working, you’re well on your way to working with objects!

Get 3D Game Programming for Kids, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.