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! While you're at it, check out some resources Treehouse students have shared here.
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
adamzemmoura
29,481 PointsOO JS by example - Four in a row game : Importing of Game object into App.js
I am working on the Object Orientated Javascript By Example project -- building a 'Four in a row' game and having trouble with the App.js file...
Is it not necessary to first import the Game object from the Game.js file so that it is available to use in App.js? I am familiar with the import and export syntax of ES6.
At the top of my App.js file I have added the following line of code :
import Game from 'Game';
In my Game.js file, before the class declaration I have added export default so :
export default class Game {...}
I am using an up to date version of Chrome and in the console I keep getting error messages on the lines with the above code. Am I missing something?
Any help appreciated!
Thanks