marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
3.03k stars 799 forks source link

Ch 10 errors in sandbox #386

Closed dhollinden closed 6 years ago

dhollinden commented 6 years ago

I'm looking at the code for the const weekDay = function()

  1. Activate the editor

  2. Run code -> console log shows expected result

  3. Run code a second time -> console.log shows "Uncaught SyntaxError: Identifier 'weekDay' has already been declared (line 1)"

This is happening in other places as well.

Thanks

dhollinden commented 6 years ago

In case this is helpful:

Nearly up to date! Relaunch Google Chrome to finish updating. Version 63.0.3239.132 (Official Build) (64-bit)

macOS Sierra version 10.12.6

marijnh commented 6 years ago

This isn't happening for me (on Chrome). Could it be that your browser has the old code cached? Does a cmd-r refresh help?

dhollinden commented 6 years ago

Ah, shoot, that was it. I should have thought of that. Sorry for the bother! :)

marijnh commented 6 years ago

Great, glad we found the cause