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 trialAlejandro Jiménez-Flores
Full Stack JavaScript Techdegree Student 14,981 PointsCode sample typo Under, “Operators” 3.
There is a missing comma that would separate releaseDate and runtime. This caused an error for me. It only took a minute to figure out. and that's what I get for copying and pasting. ;)
const movies = await Movie.findAll({
attributes: ['id', 'title'],
where: {
releaseDate: {
[Op.gte]: '2004-01-01', // greater than or equal to the date
} //(don’t forget to add a comma here! ;) )
runtime: {
[Op.gt]: 95, // greater than 95
},
},
});
console.log( movies.map(movie => movie.toJSON()) );
1 Answer
jl64
Full Stack JavaScript Techdegree Graduate 19,359 PointsOver half a year later, and this is still not fixed. It'd be really cool if they actually made these into video lessons as well, but doubt that will ever happen.
jl64
Full Stack JavaScript Techdegree Graduate 19,359 PointsAlso, at the bottom of the "Operators" section, this text is incorrect: "... like check if a string value "startsWith" or "endWith" a certain word:" It should be "endsWith".
And the final example is incorrect as well. The "order" line is missing a starting bracket.
Someone needs to be checking the course material for mistakes before it goes out, and updates need to be made promptly, not years down the line.
Emre K.
Full Stack JavaScript Techdegree Graduate 16,408 PointsEmre K.
Full Stack JavaScript Techdegree Graduate 16,408 PointsGreat point, Alejandro!
Thanks for the clarification.