marijnh / Eloquent-JavaScript-1st-edition

The source for http://eloquentjavascript.net
http://eloquentjavascript.net
324 stars 17 forks source link

Terrarium in chapter 8 not printing correctly #10

Closed zanqi closed 11 years ago

zanqi commented 11 years ago

terrarium.start() only outputs one line: [Object, Object]. No exception is displayed in the output.

Browser is the latest official version of Chrome: 28.0.1500.72 m

marijnh commented 11 years ago

Are you using the website's built-in console, or your browser's console? This still works fine for me.

zanqi commented 11 years ago

I was using the site's built-in console. Run codes by clicking the arrow button of the code snippet.

marijnh commented 11 years ago

Maybe you failed to run the code that defines the toString method on the terrarium? What happens when you shift-click the arrow next to the terrarium.start code?

zanqi commented 11 years ago

shift-click does print it correctly. I didn't know the shift-click shortcut. I must've missed running some code snippet.