Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Jasmine VanExel3,515 Points
Game not starting; getting eror
Uncaught ReferenceError: index is not defined at new Token (Token.js:4:28) at Player.createTokens (Player.js:15:21) at new Player (Player.js:7:24) at Game.createPlayers (Game.js:14:26) at new Game (Game.js:4:29) at app.js:1:14 Token @ Token.js:4 createTokens @ Player.js:15 Player @ Player.js:7 createPlayers @ Game.js:14 Game @ Game.js:4 (anonymous) @ app.js:1
Steven Parker216,812 Points
As Steven Vallarsa suggested, check on line 28 of Token.js in case you accidentally used the name "index" where you intended to use the name of a variable already declared. If that doesn't resolve the issue, post the actual code (via a link to a snapshot) so we can take a closer look.