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 trialSAMUEL LAWRENCE
Courses Plus Student 8,447 PointsQuiz question has a big mistake
Hi Guys, I'm doing the JavaScript ES6 course,
link
https://teamtreehouse.com/library/getting-started-with-es2015-2/defining-variables-with-let-and-const/review-creating-variables-with-const
In the create variables with const
quiz there is an error which causes you to get an answer wrong even if you're correct.
The question asks
Which of the following produces a syntax error?
the choices are
A
const days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'];
days.push('Saturday', 'Sunday');
B
const names = [ ];
names [0] = 'Sarah;
names[1] = 'Ryad';
names[2] = 'Nic';
C
const items ['eggs', 'milk', 'coffee'];
items.pop( );
items.pop( );
items.pop( );
D
None of the above.
The correct answer is supposed to be D
.
But the first time I tried the quiz I noticed that names[0] = 'Sarah;
is missing the closing single quote, which does not make it a string and therefore will return an error. I know because I wrote the code in my code editor and tried it and it return an error. I'm sure it's a typo but the instructors shoulc fix it. Andrew Chalkley Dave McFarland
4 Answers
Steven Parker
231,275 PointsGood eye! But you should report this directly to the staff as described on the Support page.
Dave McFarland
Treehouse TeacherThanks SAMUEL LAWRENCE !
I've fixed this error.
Steven Parker
231,275 PointsDoes Sam get an "exterminator" for that?
Dave McFarland
Treehouse TeacherYou know he does Steven Parker -- https://teamtreehouse.com/samuellawrence
Steven Parker
231,275 PointsThanks Dave, I just looked too soon at his profile.
SAMUEL LAWRENCE — Welcome to the "club", fellow exterminator!
Dave McFarland
Treehouse Teacherha ha -- no I forgot until you reminded me Steven!
SAMUEL LAWRENCE
Courses Plus Student 8,447 PointsThat's awesome, and you're welcome Dave
SAMUEL LAWRENCE
Courses Plus Student 8,447 PointsSteven Parker thanks, excited to be a member of the exterminator club. Thanks for the badge Dave McFarland . I love Treehouse.
Maycey Davis
2,792 Pointswhats the real answer
Steven Parker
231,275 PointsAs Samuel pointed out, the correct answer is "None of these produces an error."
Maycey Davis
2,792 Pointsok
SAMUEL LAWRENCE
Courses Plus Student 8,447 PointsSAMUEL LAWRENCE
Courses Plus Student 8,447 PointsI didn't know that's where I should report it. Thanks. In future I will.