
Join the Conversation!
Subscribing gives you access to the comments so you can share your ideas, ask questions, and connect with others.
"Please login to view comments"
Subscribing gives you access to the comments so you can share your ideas, ask questions, and connect with others.
Complete source code available till this point of lesson is available at
How did you manage to remove the blur property and reach here?
Upgrading gives you access to quizzes so you can test your knowledge, track progress, and improve your skills.
By logging in, you'll unlock full access to this and other free tutorials on JSM Pro.
Why? Logging in lets us personalize your learning experience, track your progress, and keep you in the loop with new workshops, coding tips, and platform updates.
You'll also be the first to know about upcoming launches, events, and exclusive discounts.
No spam—just helpful content to level up your skills.
If that sounds fair, go ahead and log in to continue →
Enter your name and email to get instant access
##Looks like we found a thief monkey By the way, I liked the trick how you reached till here. You have a good sense of humor. You will improve a lot if you join our course with this passion.
var
(function-scoped, outdated)let
(block-scoped, modern and recommended)const
(block-scoped, cannot be reassigned)_
, or $
let let = 5;
is invalid)myVar
and myvar
are different)string
, number
, boolean
, null
, undefined
, bigint
, symbol
Objects
, Arrays
, Functions
Subscribing gives you access to a brief, insightful summary of each lecture to stay on track.
00:00:02 Let's implement the collection model.
00:00:04 Remember how we had tags not that long ago?
00:00:07 Well, now we're going to implement collections.
00:00:10 Collections allow you to store or bookmark or favorite specific questions.
00:00:16 You see this star?
00:00:17 That's it.
00:00:18 It allows you to start it and add it to your collection.
00:00:21 So let's implement it by creating a new database model called collection.model.ts.
00:00:28 Let's copy the template model into the collection model.
00:00:32 And let's simply change this name from model to collection.
00:00:38 Great.
00:00:39 Now let's define it.
00:00:41 It'll be super straightforward.
00:00:42 The only thing we need to keep track of is the author, meaning who is adding it to the collection.
00:00:49 That's going to be a schema.types, come on Copilot, learn it already, with a reference to a user and required to set the true.
00:00:58 And the question as well, which is going to be a reference to a question.
00:01:04 Great.
00:01:05 Good boy, GitHub Copilot.
00:01:06 Finally, let's define the type.
00:01:09 Author will be set to types.ObjectId and question will be types.ObjectId as well.
00:01:16 Great.