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 trialBrooke Guy
8,179 PointsIs my constant wrong?
Is my constant wrong in my answer? I can't figure out what i did wrong...
class Student {
constructor(gpa){
this.gpa = gpa;
}
}
const gpa = new Student ('3.9');
3 Answers
prateekparekh
12,895 PointsIf you read the question again, the challenge asks you to use a specific variable name with a gpa value of 3.9
const student = new Student(3.9)
Does that answer your question?
Adam Beer
11,314 PointsNow create a new student variable so var student or const student or let student after this equal to new Student(3.9). When you use numbers don't use apostrophs. Only the strings should be used with apostrophs.
var student = new Student(3.9);
Lynnet Ziyenda
7,664 Pointsvar student = new Student(3.9); it really works