Closed PolarisTLX closed 6 years ago
You are using the game levels from the 2nd edition, which have a different format. This is rather confusing at the moment, since there are links in the book that will take you to the 2nd edition code sandbox. I hope to move the 3rd edition to the top of the domain, which will fix those links, somewhere next week. For now, get the game levels from http://eloquentjavascript.net/3rd_edition/code/#16
I first tried writing out the code, and got the error below. Then tried just copying the code straight from the chapter's page and get the same error:
"Uncaught (in promise) TypeError: plan.trim is not a function" pointing to the following parts of the code:
at new Level:
at runGame:
at:
I am able to use the code from the sandbox, and I can get that to work and play the game, but that seems to only be the ES5 (2nd Edition) versions of the code. So I am a bit lost on how to debug further for the 3rd Edition of the code.
I have tried putting all the code into 1 HTML file (except the CSS) and attached in case that helps. Thank you.
Project 3 - All code in HTML.txt