Code: Learning about JavaScript Objects

The code from Chapter 16, ​Learning about JavaScript Objects​, should look something like the following:

​ <body></body>
​ <script src=​"/three.js"​></script>
​ <script>
​  ​// Your code goes here...​
​ 
​  ​var​ bestMovie = {
​  title: ​'Star Wars'​,
​  year: 1977,
​  };
​ 
​  ​var​ bestMovie = {
​  title: ​'Star Wars'​,
​  year: 1977,
​  stars: [​'Mark Hamill'​, ​'Harrison Ford'​, ​'Carrie Fisher'​],
​  };
​ 
​  ​var​ bestMovie = {
​  title: ​'Star Wars'​,
​  year: 1977,
​  stars: [​'Mark Hamill'​, ​'Harrison Ford'​, ​'Carrie Fisher'​],
​  logMe: ​function​() {
​  console.log(​this​.title + ...

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.