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 trialSophia Sundance
1,300 PointsCreate variable called User? My solution is not working.
My solution is not working, although it is the same as in the official solution. :-(
class User { constructor(email, username, birthday) { this.email = email; this.username = username; this.birthday = birthday; ) } const user1 = new User("JavaScriptStudent@teamtreehouse.com", "JSUser1", "1/08/1991);
class User {
constructor(email, username, birthday) {
this.email = email;
this.username = username;
this.birthday = birthday;
)
}
const user1 = new User("JavaScriptStudent@teamtreehouse.com", "JSUser1", "1/08/1991");
2 Answers
Rohald van Merode
Treehouse StaffHi Sophia Sundance,
It looks like your constructor is being closed by a )
instead of }
. Changing that bracket on line 6 should fix the error 🙂
Hope this helps.
Rohald van Merode
Treehouse StaffNot sure what caused that issue Sophia. I deleted the workspace on my end to initialise a new one but the starter code seems to be correct on my end.
Sophia Sundance
1,300 PointsOk, thank you. I ll try that!
Sophia Sundance
1,300 PointsSophia Sundance
1,300 PointsOk, thank you. I did not retype the constructor in the task. Just had to write the "const". Maybe there is an error in the task?