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 trialshirshah sahel
10,035 PointsCan some please take a look at what I might be missing in my code.
'use strict';
class Student {
get name(){
return `${this.firstName} ${this.lastName}`;
}
constructor({ firstName, lastName, age, interestLevel = 5 } = {}) {
this.firstName= firstName;
this.lastName= lastName;
this.age = age;
this.interestLevel = interestLevel;
}
}
let stevenJ= new Student({firstName: 'steven';, lastName:'Jones', age: 22});
console.log(stevenJ.name);
3 Answers
Steven Parker
231,269 PointsOn the 2nd to last line, there's a stray extra semicolon between the name 'steven' and the comma.
nfs
35,526 Pointsah... Eagle eyes.
Steven Parker
231,269 PointsNice image!
shirshah sahel
10,035 PointsHaha.. steven Parker.
shirshah sahel
10,035 PointsThank you Steven, got it.