JavaScript OOP Crash Course (ES5 & ES6)
Video Title: JavaScript OOP Crash Course (ES5 & ES6)
Hey what’s going on guys welcome to my object oriented programming in JavaScript crash course in this video we’re gonna look at some of the basics and core concepts of writing code in an object-oriented fashion in JavaScript and this content is very closely related to my modern JavaScript from the
Beginning course on udemy so if you haven’t checked that out I’ll put the link in the description if you have and some of this might look familiar to you it’s not the same code but we’re looking at some of the same concepts so in this video we’re gonna look at a lot of
Different things we’re gonna look at object literals which if you’ve used JavaScript for any amount of time you’ve probably have used we’re also going to talk a little bit about what an object is then we’re going to move on to es5 constructor functions and prototypes ok we’ll also talk a little bit about
Inheritance I’ll talk about the object create method and we’re also going to look at es6 classes now it’s important to know that when you use es6 classes these are basically it’s called syntactic sugar or a convenient syntax and the reason for that is because your writing thing you’re writing it in a
Different way using classes which relates more to other languages like Java c-sharp PHP and so on but under the hood it’s still using those prototypes it’s still using that es5 syntax and I’ll show you I’ll show you that in the browser tools now when when it comes to
Objects in JavaScript basically and this isn’t real code I’m going to type I’m gonna I’m going to delete this after but basically we have an object and we can do dot and we can you either call it property on it so if it has a property
Associated with it or if it has a function associated with it it’s actually called a method okay so we can either have a property like a string or an array or another or an object literal something like that or it can be a function that actually executes now
There are languages where you hear everything is an object such as Ruby in JavaScript it’s a weird because almost everything is an object you have a couple data types like strings numbers boolean’s these are actually primitives but you can use methods on a string okay so if I were to
Say cons ass so caught string equals hello I can actually do like console dot log and I can take that string and I can do dot – I’ll do to upper case which is a method okay so basically it seems like it’s an object with a method if I save
That we get hello in all uppercase so basically this is a primitive it’s not an object but once we call a method on it like this JavaScript behind the scenes as adds a wrapper to it and you can actually create strings as objects so you can do like Const s equals new
String like that okay and I’m just going to show you a different let me call this something else I’ll call this call this s 2 and this s 1 and let’s do s1 right here all right now let’s take a look at the types of these two okay I can
Actually get rid of this so let’s do console dot log and let’s say type of so this is an operator that will actually give us the type of what what’s in this variable and if I save that we get string if I do the same thing down here for s2 oops not 12
– we get object okay so basically when we use a method like to uppercase or something it’s kind of it’s doing this behind the scenes okay but but by default this isn’t this is a primitive it’s not an actual object okay hopefully that makes sense it’s a it’s a it’s
Really hard to explain actually and then we also have and I’m gonna leave this but I’ll comment it out we also have like Dom objects such as the window so if I say console dot log window that’s actually the the parent object of everything and if we look at this inside
Our console you’ll see it has a bunch of methods one of these being alert which is really popular it just basically gives us like a pop-up so we can take that window object and we can call the alert method okay and I didn’t put anything in there but
We could put something in here so let’s put like a 1 and it will alert us with a 1 now since window is the absolute parent object there’s basically in the DOM and the browser there’s nothing above window so anything with window you don’t have to actually do window dot we could
Simply do alert one okay we also have inside window we have a ton of stuff here but just to give you another example we have the Navigator which is like kind of like the browser like the your system for instance we could do let’s see let’s comment this out and
This out and we could say console dot log and since navigator is actually part of the window object we don’t have to do window dot navigator even though that would work but let’s do navigator you can see what vs Co we actually have a drop-down of the available methods and
Properties but let’s do at version which is a property so we’ll save that you can see it’s going to give you basically some info on my system what OS I’m using what browser I’m using it’s a little weird because it does it says Chrome which is what I’m using but it also says
Safari so this is this is kind of weird how it’s formatted but just to show you that we can call methods so window dot alert is a property with a method and then navigator app version is a prop is a object with a property ok so I know
That that if you’re just getting into JavaScript that may be a little difficult to understand but I did want to just bring it up so now we’re gonna get into object literals which are is actually easier to talk about than this stuff so let’s create let’s create a
Book that is an object literal we’re gonna work with books in this throughout this course here so let’s call it book 1 and let’s create it by adding just some curly braces so this is an object literal and in here we can have properties which are just key value
Pairs so we’re going to say tie it let’s say book 1 and let’s do otter and we’ll say John Doe and let’s do a year and we’ll say 2013 ok so now we can go down here we can console dot log and if I just log book 1 and save you’ll see
That we actually have an object here with with some fields guys same thing that you can see here now if we want to call an individual property like let’s say title then we can take that object and we can call that property so dot
Title all right so we get book 1 and I know a lot of you guys probably know this stuff you probably want to get into the constructor and prototypes and all that but just for the people that don’t really you know the people that are new
Really new to JavaScript I just want to kind of explain this stuff now in this book 1 we can also put in a function as a property so let’s say we want to do get summary we can actually set that to a function and what I want this to do is
Basically return a string that’s gonna say like book 1 was written by John Doe in 2013 so what I’m gonna do is return and I’m gonna use two template literal here so when use backticks instead of single quotes or double quotes so I don’t have to do all kinds of
Concatenation this is part of es6 by the way and then we’re going to put in a variable of this dot title now this is referring to this specific object so we can get the title of this object by saying this dot title so we’re gonna say this sought title was written by and
Then I want the author so I’m going to use this syntax again and say this dot author in and then I want the year so I’m gonna say this dot year okay so now we have a method or function attached to this object so I could say book 1 dot
Get summary and save it we get book 1 was written by John Doe in 2013 ok so this is an object you just put a column in here now what if we want to create more than one book I mean we could take this and we could
Go down here and we could say book to change this to book two we’ll change it to Jane Doe is the author and will say 2016 okay we’ll still have the get summary in there as well and then we could do book to get summary and save
And we get book to is written by Jane Doe in 2016 now oh one other thing I wanted to show you is if you actually want to see all the values of an object we could do console dot log and we could actually do object dot values and we can
Pass in let’s say book two and save and that will actually give us an array of the values inside we can also get the keys actually I’ll keep this I’ll just copy this down and we can say object dot keys of book two and that’ll give us the keys
Which is title author year and get summary okay so I just wanted to show you guys that as well now if we wanted to keep creating books or even if we wanted to create two books like this it’s kind of a pain because we have to create two object literals we have to
Create get summary twice we have to create the same function twice so this is where our constructors come in okay so we’re going to move on to constructors I’m going to save this and go to to underscore constructor J s and just change that in my index.html so to
Underscore constructor J s alright so with a constructor it’s basically just a function so it’s a constructor and this is es five by the way we’re not working with classes or anything yet so let’s say function book okay and you want to give it an uppercase B so function book
And right now I’m just going to console dot log and I’m just gonna say book initialized or instantiated I guess would be a better term but and it’s fine so we have this constructor and now we can actually create books from this constructor so we can say Const book 1
Equals new book now if I save that you’ll see book initialized and the reason that this ran is because when you instantiate I shall just put that in here instantiate a an object so when you instantiate an object from the constructor it’s gonna run whatever is
In here and all I have in here is a console log now if I were to create another book so let’s say book – oops book – and save you’ll see this is going to run twice because we initialized our instantiated to book objects now this code is pretty useless because all we’re
Doing is logging this so what I’m going to do is pass in to our constructor a title and author and a year okay just like we did with the literal and we just want to set we want to take this dot title which is going it’s good it’s
Going to refer to whatever instance where we’re using and we want to set that to the title that’s passed in okay and we want to do that same thing with all of these so this one let’s do so author and then this will be year year so now what’s happening is when we
Instantiate a book we want to pass in these three things so let’s go down here let’s say book 1 and the author is john doe and what else did i have the year so we’ll say 2013 bear with me guys i’m doing this like off the top of my head
So and then we’ll have book 2 we’ll say Jane Jane Doe and the year will be you let’s say 2016 alright so now I save this we’re not going to see anything here because this is getting executed but all it’s doing is assigning properties now if I wanted to get let’s
Say the title of book one I could say console dot log book one dot title ok just like I could with the object literal but now we can create as many books as we want with this constructor alright if we want to look at just the
Book 1 itself you can see that we get the same thing as we did with the literal except it’s now prefixed by the actual type of object it is which is a book all right and you see also notice this proto AAB this is like kind of like
A pseudo object and this will show us anything that’s in the prototype now we don’t have any specific prototype methods for the book object but there is an object dot prototype and that’s what you’re looking at here and this actually has a bunch of its own methods all right
I’m not really going to get into object dot prototype and stuff but it is there and it does every object is going to inherit that so let’s let’s create remember that gets summary we had in the base in the litter and literals here so we have two object literals we had to
Repeat get summary what we could do is we could put this as a property so we could say this get summary in our constructor and set that to a function and what I’ll do is just copy the return value here and paste that in and now we can call
This get summary with an even if we had a hundred books here we could just do book one dot get summary and save and we get book one was written by John Doe in 2013 we can do book two okay and if we had a thousand books we could still call
Get summary and it’s only defined once rather than defining a thousand object literals with a thousand get summaries alright now if we look at book two just book two in our console you’ll see it has the the basic properties we added at first but it also has gets summary as a
Function now this is a good example of where we should use a prototype method instead of putting it right in the constructor so now we’re going to move on to prototypes but I just want to copy actually we’ll copy the whole thing so I’m going to copy this and go to
Prototypes and we’re gonna have our constructor and instead of putting get summary right inside the constructor let’s create a prototype method so we’ll say get summary and what we can do is just say book so we’re going to take the object name or the constructor function name whatever you want to call
It and we’re going to call prototype dot get summary and we’re going to set that equal to a function and I’m just going to grab the return paste that and we’re going to completely get rid of this from the constructor okay now we should still
Be able to do book two dot get summary and save wait a minute why is it give it oh I didn’t change the JavaScript file it should now be three underscore prototypes okay so now you can see in the console we’re getting booked to is written by Jane Doe in 2016
So it still works and if we actually look at book two now it has just the title author and year you don’t see the get summary in in the actual object but if we look at proto there it is okay so it’s now stored in the prototype rather
Than in the object itself and the reason we want to do this is because we do want a title author and year for every book but we’re not we’re not gonna want get summary for every book so that’s why we want to store it in the prototype okay
And if we do another one let’s let’s put another prototype here I’m just going to call this get age which is kind of weird but what it’s going to do is just give us the number of years that have passed since the book was created so let’s say
Book dot prototype dot get age equals function and let’s return actually let’s create a variable we’ll call it age or I’ll call it years so we’ll say years let’s do new date so it’ll give us today’s date if we leave the parameters blank but I want to get the full year so
They’ll give us a four-digit year of whatever now whatever the year is now which is 2018 and then I’m just going to subtract from it this dot year and then all I want to do let me close this sidebar up actually make this bigger what I want to do after creating years
Is just return and I’m going to use an object literal here and I’m just going to say I want to use the title so I’m going to use the syntax so I can use a variable I’m going to say this dot title is and then we can use that years
Variable so we’ll say is years and then the tech years old and then if I were to save this and we just look at book to itself and look in the proto you’ll see get aged and if I want to use it I can simply do dot get aged and save wait a
Minute not a number Const years equals new date gif oh I forgot parentheses there we go so book two is two years old all right so let’s create one more prototype method and let’s create one where we actually manipulate the data so I’m going to call this revised and what
We want to do is basically just change the year because if it’s revived if it’s revised or it’s rewritten then I want to add the new year so we’ll say book dot prototype dot revised equals a function and this is actually going to take in a
Parameter of new year okay and then what we want to do is just set this dot year equals to whatever the new year that’s passed in and then I’m also going to add a property to it called revised just so we know that it’s been revised and I’m
Going to set that to a boolean of true and then what we’ll do is we’ll go down here I’ll console log book – and then we’ll revise it so we’ll say book 2 dot revised and we’ll pass in a year so we’ll say 2018 this year and then let’s
Console.log it again ok so we’ll say book 2 and save so the first one you see the year is 2016 and then we revised it in the second one the year is 2018 and it also add revised true to it ok so you can manipulate the data as well
All right so I think that that’s that’s as far as I want to go with just creating different prototype methods I know that these are kind of weird examples but I want to do something that’s simple and understandable so now we’re going to take a look at inheritance
Okay with prototypes so let’s go to inheritance let’s actually copy let’s copy the constructor and the get summary we don’t need all the different methods so we’ll paste that in and then what I want to do is I want to create I want to be able to create a magazine object but
I want this magazine to inherit the properties of the book okay so let’s do let’s see what do we want to do here let’s say function magazine so this is basically going to be the magazine constructor so function magazine and this is going to take in we want to do
The same as books or title author year but we also want month okay and then we just close this sidebar up now in here what we can do is we can take the book object and we can say dot-com and then what this will take in is the magazine
Itself or the instance itself so this and then the the field so title author year okay now we also want a month so for that we actually have to specifies this dot month equals a month like that and then we should be able to create a magazine so we’ll say let’s say instantiate
Magazine objects so we’ll say mag 1 equals new magazine and we’ll pass in I’ll call it mag 1 author will say John Doe year will say 2018 and then month will say Jan alright and then if we were to console dot log AG 1 and save I need
To change the file again to keep forgetting so this is for underscore inheritance I can close these other ones up and you can see we get our magazine which has the title the author the month and the year now let’s say we want to use we want to call get summary from our
Magazine and see what happens we get an a type error that says get summary is not a function so in order to inherit the prototype methods of book we need to add another line here this is a lot easier with classes by the way so let’s say inherit prototype so we can say
Magazine dot prototype equals and then we want to use object.create okay we’re going to talk more about this in the next file as well so we’re going to say object create and then we want to say book dot prototype so now if I save it still doesn’t work
Magazine oh it’s because it’s I put this below the actual instantiation should go right here and save and now it works okay so mag 1 was written by John Doe in 2018 and if no matter how many prototype methods we create we’ll be able to use
That with magazine now if we look at mag 1 so one other thing I want to show you and we look at the proto object here and we look at the constructor you’ll see that it’s still using the book constructor which has title author year
We want it want to change this to the magazine let’s say use magazine constructor then we can say magazine dot prototype dot constructor and we can just set that equal to magazine and save and now if we take a look you’ll see that now the constructors magazine and
It uses title author year and month okay so that’s that’s basic prototype inheritance so now I want to look at a different way to create objects and that’s object dot create and before I forget I’m gonna just rename this file to five underscores object create and I
Know I’m going kind of fast guys but this is a crash course so I’m trying to just cram as much information as I can while still trying to explain it well the first semi well hopefully so for object create we want to first create an object of our prototype so so the
Methods that we want to use okay and there’s so many ways to do this type of stuff you have all types of design patterns you can use factory method factory pattern and all that but we’re trying to try and keep this pretty basic so we’ll say object of proto’s and I’m
Just going to call this book proto’s and let’s use get summary and we can just set this to a function geez I can’t spell so function and then I’ll just grab from any of these we’re basically doing the same thing in all of these just in a different way so let’s put
That in let’s also do get age which will be a function I’ll get that here so take that and notice the actual logic using this dot it’s all it’s all the same so now we have our prototypes and now what we can do is let’s create the object and
There’s a couple ways we can do it so let’s do book 1 equals object dot create and then we want to pass in the prototype so book proto’s and then one way to do this to add properties is we could do book 1 dot title equals book 1
And let’s do what is this gonna be this is author and then we have what year so I’ll do 2013 and now we can console dot log and we can say book 1 and take a look and there we go and if we look at our proto
So we have get aged and get summary ok so you can see it’s it’s doing the same thing all these different ways that we’re doing this in another way another syntax if you don’t want to do like Book One title book one author we could do this a little differently so I’m gonna
Just grab this first line and instead of doing it separately we could just add in another parameter of an object and we could put each property so we could say title but we have to set an object with a value key and then whatever the value
So book 1 comma here and this will be what I keep forgetting Arthur and this will be here okay so if I save that we get the same exact thing okay I rarely use like this type of thing here but you know it’s just I’m just trying to show you guys different different
Ways to do things so that’s object.create now I think that we’re gonna be done with es5 prototypes and stuff like this and let’s move on to es6 classes which makes things a lot easier but remember it’s going to be doing the same type of stuff underneath
And I’ll show you that so let’s close that up let’s go to index.html and change this to six understand let’s do six underscore classes j/s okay I am here we’re gonna create a class and if you have any experience with other object-oriented languages this should be very familiar so we’re gonna say class
Book and we want to do constructor and you can use classes now without having to use babel or anything like that I think it’s just ie that that there’s trouble with but I don’t know I don’t when I develop I don’t care about ie no one uses it anymore
So for our constructor we’re gonna do title but you can if you want you can still you know use Babel’s and compile even if you’re just using classes so let’s do title author and year and then this is going to be no different than our constructor function that we did in
That you know back in the second file so this dot title equals title here okay so that’s our constructor so now we can instantiate an object the same exact way so const book 1 equals new book that’s the name of the class book 1 okay
So now if we go down here in console dot log book 1 and save there we go ok now if we want to add a method to our class let’s do that let’s add get summary ok so we can simply say get summary no dot prototype or anything like that and I’m
Just gonna grab the functionality which is just this return and put it in here and now if I save that I can go down here and let’s actually look at book 1 and we have our author title year and let’s look in proto there it is get summary we also have our constructor
In here and which shows that we’re using the class of look but we also have the proto prototype method get summary so you can see that under the hood it’s doing the same thing it’s just basically syntactic sugar it’s an easier way to write it so let’s add some of our other
Ones here like get age and they’ll grab that from the prototype and then we’ll also do revise which takes in parameter of new year I’ll grab that same functionality no different and now if we look at our proto you’ll see that we have all of those methods in
There and if we wanted to revise book 1 we could say book 1.4 Faiz and let’s say 2018 book 1 and save and you can see 2013 then we get 2018 revised true so same exact functionality just a different way to do it now we also have something called static methods where
You can actually have a method in your class that you can use without instantiating an object like this now if you’re using something that’s specific to that instance like for instance the title author year then you wouldn’t use a static method but let’s say we want to
Create one so we used the keyword static and let’s have one called top bookstore this is kind of stupid but it’s just to show you how to do this and then we’re just going to return a string of Barnes & Noble alright so that’s all that does
But it’s static meaning we don’t have to instantiate it in fact if we were to let me just comment this out if we were to do book 1 dot top bookstore and try to run that it’s gonna say it’s not a function what we need to do is run this
Function on the actual class so that class would be book save that and oh I returned it so we actually have to console.log it and save and we get Barnes and Noble okay so I think that’s that’s pretty much the the fundamentals of creating a class with properties and methods and
Stuff so now let’s look at subclasses so I’m gonna just copy all this and go to subclasses and let’s get rid of let’s get rid of all that and then we’ll just keep let’s see we’ll just keep get summary then I only need one method to work with here now
Let’s say we want it we want to have a subclass called magazine which will have everything a book has but also have a month so we would do let’s put a comment here let’s say magazine subclass and for you react developers this will look very very familiar
So we’ll say magazine extends book okay I hope something to put they mean to put parentheses there so class magazine extends book we want to put a constructor and the fields that we want which are title author year and month now in order to get in order to call the
Parent constructor we want to use a function called super and again if you’ve worked with react and you’ve most likely used this uses super before and we just want to pass in the original book parameters so title author year and then in addition to that we want to add
A month which will be set to the month that’s passed in all right so we can go down here now and let’s say Const mag one new magazine close this sidebar let’s do 2018 and month Jan alright and then we’ll just console.log mag one save oops I forgot to change the file again
So this should be seven I’m just seven underscore subclasses and save and there we go so now we’re seeing our magazine okay now let’s say we want to use the get summary method here so if I were to do mag one dot get summary and save it
Works mag one was written by John Doe in 2018 so even you know using subclasses is a lot easier than using inheritance with es5 we didn’t have to add those extra prototype lines and stuff like that so it does make it easier but I also think it’s important to kind of
Understand what what goes on underneath and it can be really overwhelming because there’s a lot of different ways to do things you know a lot of times you’ll be using a framework which makes it nice because it kind of makes the rules for you and you just follow those
Standards but when you’re doing it with vanilla JavaScript it’s hard to decide a design pattern or you know how you’re gonna create your objects so you can use classes or not it’s you know what I would suggest is looking at it’s taking a project that you’re going to create
Think of the project first and then look at code bases that are of a similar type of project that’s what I find the most useful I find tutorials and courses and stuff good for the syntax but if you want to look it like structure as a whole in design patterns
And stuff look at github look at other projects similar to what you are doing also ask questions you know and ask the right people ask developers that are helpful that will give you logical examples of why to use one way over another rather than asking arrogant
Pricks which there are a ton of that just want to seem smart and they’ll give you the most complicated way they can think of just so they feel higher than you and I can’t I can’t stand those kind of be I can’t be around those types of
People you know so make sure that you ask the right people and that goes for online as well as in the workplace or wherever alright so that’s gonna be it guys hopefully you enjoyed this little crash course and I will see you in the next video hey guys if you’ve been watching
My videos for a while and you really like what I do when I’ve helped you out a lot consider becoming a patron even for one dollar per month it pushes me to keep bringing you guys the best content I possibly can there’s reward tiers for discounts for
You to me courses personal support and more so check out the patreon link in the description below for more info
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
00:00 – 1_basic_literals.js
10:22 – 2_constructor.js
15:50 – 3_prototypes.js
21:15 – 4_inheritence.js
26:00 – 5_object_create.js
30:16 – ES6 – 6_classes.js
35:20 – 7_subclasses.js
Super
God bless you Traversy
I loved every bit of this, Really learnt a lot. A great course for beginners
My favorite part of this video is by far 39:39 about asking the right person for help online and in person! I hate complicated answers for simple questions!
Watched in 2023. Thanks Brad!
Love you Brad sir from Pakistan ❤❤
The love i Feel for You It's so much that I could cry
This is beyond a life saver and helpful, Brad, thank you!
Thank you very much Traversy Media <3
very clear and neat, thanks!
Cheers mate
Why would we not want the title, author and year in the prototype? It is placed in the object, but would you not want it in the prototype also? This is at minute 17:30 (ish).
Where is the Github link?
Wish you all the goodness in the world 🙏❤
Thank you
As I observe your teaching style, Brad, I become more and more convinced that teaching is not a career suitable for everyone. But, it is evident that you were specifically designed for this purpose. Your ability to articulate complex ideas in a clear and effective manner is truly remarkable, enabling anyone to grasp the concepts easily.
At about 19 minutes in you're writing prototype methods (getAge and getSummary). When doing this, I wrote them as arrow functions and my properties were returned as undefined. Any explanation why the arrow function does this?
WHO IS DOE GUYS??
14:31
the prototype method with revising was really useful, thanks homie
Thanks a lot brad for this crash course