Let's take a look at some practice exercises to get more practice with Classes and Object Oriented Programming in Javascript together.
We warmup with a couple of examples of Classes with constructors and methods.
Then, we move to the interaction between Classes and their instances where we model a Bookstore and its Books.
We then move to a fun exercise where we try to model a simple Space Invaders style game. We go through some potential fields and methods of both the Player and Enemy in the game and what that might look like as well some some starting code for them.
We wrap up these exercises with a Bonus where we take a look at how we might implement a Factory Class/Function in Javascript. This is quite common in other languages like Java and allows us to create classes of various types from one "Factory" class.
This is part of a series where we go over Javascript in depth to learn programming concepts as well as web development: • Javascript In Depth
Chapters:
00:00 Introduction
00:45 Warmup Exercise - Animal Class
06:55 Exercise 1 - Student Class
15:43 Exercise 2 - Books in a Bookstore
25:14 Exercise 3 - Space Invader Modelling
45:38 BONUS Exercise - Enemy Factory
1:05:40 Next Steps
📦 Github Repository with the notes and exercise code+solutions: https://github.com/Nooder/javascript-...
💬 Come join us on Discord to chat with a like-minded community about tech and learning: / discord
🏅Support the channel and content through Super Thanks, Channel Memberships, or on Patreon: / techwithnader
In questa pagina del sito puoi guardare il video online Exercises: Introduction - Classes and Object Oriented Programming (OOP) - Javascript In Depth della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Tech with Nader 23 dicembre 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 5,692 volte e gli è piaciuto 200 spettatori. Buona visione!