- Classes feature heavily in modern JavaScript frameworks
and getting comfortable with writing
and using them will be a huge asset to you
as you started working with
advanced JavaScript sites and applications.
To help you solidify your understanding
of classes right away
here's a practice assignment for you.
In the practice files you'll find the backpack class
we've been working with so far.
Using this class as a reference,
I want you to create new classes
based on one or more of the objects you created
in the previous practice sessions.
I recommend creating separate files
for each class and importing them as modules
so you have a clear separation of concerns.
The easiest approach to building a new class
is to start with a fully built out object
and then migrate the properties and methods over one by one.
Then once the class is complete, you can test it
by recreating the original object using that class.
Build several classes and objects based on those classes.
Make sure each class has several properties
and at least one method interacting
with those properties
and test the objects created from the classes
in the browser console
to make sure everything is working properly.