Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Jasmine VanExel3,522 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 Parker228,077 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.