Clear, concise and beginner friendly. Finally someone that knows how to teach to people who are new to code! It can be so frustrating trying to find digestible lessons on YT!
I have watched so many tutorials and im taking classes on Coursera. Nobody has come close to making this make sense for me the way that you have. By far the BEST explanation ive ever heard Thank You! I will be subscribing.
For one year almost I was struggling with classes avoided using it in the projects but today I can say I got it! Seriously this is the best tutorial I saw on classes. Loved it!
Now when I feel like I need a basic knowledge of something, I first browse all the series found on Ninja Channel, better explanation as always; keep the good work
i always see these kind of comments everywhere and I thought that most people are lying but this really did make it more understandable. in fact, in every oop videos i've watched, this is the only one that i saved on my playlist
I kind of grasped this concept before. However, this explanation along with practice helped me to consolidate this idea. I'll be coming to this channel more often. Thanks for the help!
I've struggled to understand the concept in other programming languages but the way you've explained the subject by first showing how to write standalone objects and seconly how to create them dynamically via classes is that missing gap I've had for a long time. Thanks a whole lot! You're incredible!
Netninja is so great. Every time I get stuck at some point in a long course elsewhere, I come to this channel to see individual topics explained much more clearly. Thank you :D
Dude. You're 1 million times better at explaining than any other person I've seen on RUclips or Udemy. I swear all other tutorials on anything web dev speak to me as if I'm a robot. I am not a robot, thank you for teaching humans as humans.
you should really watch the stuff from 'Dev Ed' then. Both on youtube and his actual courses. Makes it easy to understand and it's funny at the same time.
Wow! The 'class' is used in that way. I always write the codes in like "function User(email, name){ this.email = email; this.name = name}". Maybe there are some reasons why they grabbed the 'class' into Javascript. I expect you, the Net Ninja, to explain well as always! I appreciate your teaching all the time!
Classes were never a thing in the past within JS. What you just described is creating a constructor function, that was the old way to create these type of objects, but when it came down to the prototype and inheritance the required code just looked horrible and difficult to read, thus with a newer version of JS classes were introduced to replace the old classic constructor functions. Both do the same thing, the code is just much easier to manage later down the line with classes.
Hi, I have to say I have just been accepted into Lambda School for Dec/Jan, having you to watch as my goto study material is just amazing. The way you explain everything in depth and complete detail is absolutely brilliant for someone like me who is a complete novice to coding/web dev, you give me confidence that I can come to your videos and if I didn't understand the concept before watching, I will after watching. Thank you @The Net Ninja
I really really like your way of explaining things. You take nothing for granted when you explain the concepts, which is really helpful. I've been doing another course,, which I actually like, but you explain things, so I get it immediately! You have a new fan:-)
By far the most useful video on the subject I have found. Truly able to explain it so that a beginner like myself can understand and digest the concepts. Thank you.
Absolutely fantastic tutorials, wished I'd come across this years ago when I started off. Anyway, not to be pedantic, but that 'new' key word actually does four things - the first three as you mentioned including the fourth which is returning the object instance it created.
You are so amazing. So clear and concise explanations. I have one confusion right now though, I have learned from older updates of JS about constructor functions when creating new objects, so how are classes different from construct functions and when should I use classes and when should I use just plain constructor functions? Thanks man keep it up!
This man explained something actually no, he explained all I need to know. he needs like a 2m sub for the precise, accurate explanations he does. #ThisManIsALegend my teacher couldn't explain this... nothing more to say alas I am at peace...
the "new" keyword let you create these {objects}. class is just syntactical sugar: try to instantiate a normal "function declaration" by using the "new" keyword and it will return the same value as long as you use "this" in declaring its properties(this.property = 'somevalue'). any normal function RETURNS "this:{prop1: value1, prop2: value2,...}" by DEFAULT as long as we use the "new" key word when instantiating. a CONSTRUCTOR inside a class does the same thing regarding this feature. the difference between a "class" and a "function declaration" is its naming convention as to where normal functions use "camelCase" but in class we use "PascalCase". in the early days the old Javascript engine inside our BROWSERS use functions similar to classes(today). this naming convention was made to avoid CONFUSION bet. a normal function vs a function being instantiated(new) with "this:{}" inside of it. normal functions does not RETURN "this" by default, only when instantiated using "new". Hope it helps.
Don't forget to mention that the 'new' keyword automatically returns the newly made object to the variable name that called the User class in the beginning.
thank you ver much for the very wel explained lessons. Great jon. A question on the var you use ? i did understand ( unless i am wrong ) that the old var was in more recent versions of JS replaced by the let and const because of ' scope ' reasons an the difference between var and let there . Is there a reason you use var here ? Would this also work with let ?
@@ayushuprety5676 Having methods come from the prototype rather than being part of every instance of the object you create will prevent unnecessary memory stores. I'm not sure how to word it but hopefully you can look it up! :)
Hi Net Ninja, I noticed you mentioned ES6 standards for these courses but I noticed your still using var instead of let or const. Was the key and const added for ES6? Or am I mistaken?
noticed you were still replying to comments so I just wanna say great tutorial, but also how do you get the notifications for caps lock? it seems pretty cool ngl
finally somebody that knows to explain.
i know right every other tutorial i watched was so confusing
True
YEEEEEES
he's incredible.
Clear, concise and beginner friendly.
Finally someone that knows how to teach to people who are new to code!
It can be so frustrating trying to find digestible lessons on YT!
I have watched so many tutorials and im taking classes on Coursera. Nobody has come close to making this make sense for me the way that you have. By far the BEST explanation ive ever heard Thank You! I will be subscribing.
Wow, thanks for the kind words Kevin :) much appreciated and welcome aboard!
All I can say is thank you. My friend lent me access to a course worth hundreds of dollars and your videos are way clearer and to the point. Amazing 👏
Wow, thanks for the kind words Weykent :) means a lot!
For one year almost I was struggling with classes avoided using it in the projects but today I can say I got it! Seriously this is the best tutorial I saw on classes. Loved it!
Man i struggled with explanation of constructor function and the "this" keyword and you explained it so well. Earned a sub.
Now when I feel like I need a basic knowledge of something, I first browse all the series found on Ninja Channel, better explanation as always; keep the good work
Omg you deserve a medal on how to explain code in such a way that even a none programmer can understand. Bravo, keep up the good work!
Is this really easy to understand or are you just really good at explaining it? Either way, I don't really care because it makes sense! Great Video.
i think somehow other videos have a way of making this seem 10x harder... and he makes this seem 10x easier 🤩
i always see these kind of comments everywhere and I thought that most people are lying but this really did make it more understandable. in fact, in every oop videos i've watched, this is the only one that i saved on my playlist
I kind of grasped this concept before. However, this explanation along with practice helped me to consolidate this idea. I'll be coming to this channel more often. Thanks for the help!
That's great to hear Dwight, thanks for your support!
I've struggled to understand the concept in other programming languages but the way you've explained the subject by first showing how to write standalone objects and seconly how to create them dynamically via classes is that missing gap I've had for a long time. Thanks a whole lot! You're incredible!
Netninja is so great. Every time I get stuck at some point in a long course elsewhere, I come to this channel to see individual topics explained much more clearly. Thank you :D
watched like 10 videos on constructors each more than 10mins long, then I come across this video. thank you.
Dude. You're 1 million times better at explaining than any other person I've seen on RUclips or Udemy. I swear all other tutorials on anything web dev speak to me as if I'm a robot. I am not a robot, thank you for teaching humans as humans.
Thank you, glad you like :)
same here
you should really watch the stuff from 'Dev Ed' then. Both on youtube and his actual courses. Makes it easy to understand and it's funny at the same time.
As a school teacher I AM IMPRESSED! you taught well my friend
Thank you! :)
Wow! The 'class' is used in that way. I always write the codes in like "function User(email, name){ this.email = email; this.name = name}". Maybe there are some reasons why they grabbed the 'class' into Javascript. I expect you, the Net Ninja, to explain well as always! I appreciate your teaching all the time!
Classes were never a thing in the past within JS. What you just described is creating a constructor function, that was the old way to create these type of objects, but when it came down to the prototype and inheritance the required code just looked horrible and difficult to read, thus with a newer version of JS classes were introduced to replace the old classic constructor functions. Both do the same thing, the code is just much easier to manage later down the line with classes.
Have been struggling with this, getters and setters and you have truly just made it so simple. Thank you!
Hi, I have to say I have just been accepted into Lambda School for Dec/Jan, having you to watch as my goto study material is just amazing.
The way you explain everything in depth and complete detail is absolutely brilliant for someone like me who is a complete novice to coding/web dev, you give me confidence that I can come to your videos and if I didn't understand the concept before watching, I will after watching.
Thank you @The Net Ninja
Awesome, thank you and congrats! :)
Easily the best explanation for constructors I've seen so far.
I really really like your way of explaining things. You take nothing for granted when you explain the concepts, which is really helpful. I've been doing another course,, which I actually like, but you explain things, so I get it immediately! You have a new fan:-)
It one of the best description of classes and constructors I've ever heard. You're rock man! Thank you.
Thanks Carl!
I've done exercises similar to this one, but this is the first time I actually understand what and more importantly why we do this. Bravo sir 👏
I love how you explained this man, it was so dumbed down and easily understood. I understand constructors better than ever now
That's awesome to know :) thanks for watching
Been searching for an explanation for constructors for too long but here you are!! thanks a lot
An amazing teacher who has a superb way of explaining things! so much better than other tutorials! Thank you so much for the material you provide!
best programming tutorials channel fast and understandable!
Thanks for making 'classes' much easier for me, I love the way you explain.
You are really good at explaining for real. I have been struggling with this for almost a week. Thank you so much
Awesome, glad it helped :)
By far the most useful video on the subject I have found. Truly able to explain it so that a beginner like myself can understand and digest the concepts. Thank you.
Glad it was helpful! :)
thank you very much these tutorials are the best absolutely easy to understand and the example you use to teach are very easy and relevant
Brilliantly explained. Straight to the point.
my gratitude for this video right here is so *astronomical*
Absolutely fantastic tutorials, wished I'd come across this years ago when I started off. Anyway, not to be pedantic, but that 'new' key word actually does four things - the first three as you mentioned including the fourth which is returning the object instance it created.
Cleanest explanation so far, thank you very much!
Thanks :)
Flawless Tutorial. You explained everything so well!
Thank you so much 😀
Glad it was helpful! :)
AWESOME , you make it simple... this.teacher = 'true teacher' Iol tks a lot for alll knowledge shared!
Thank you! 😃
Best explanation available online. Thank you so much!
You're welcome! :) hope it was helpful
Love this series. Waiting for the next part.
Thanks, your explanation is so simple and on point. I understand better now.
Clearly understandable and minimalistic video
Absolute legend great way of explaining
Thanks a lot for your thorough explanation, at last, could find a video where everything was clear. Once again thanks for your efforts.
Brave! That's why you have 700k subscripts! Keep Growing! Thanks
Simply genius explanation
always nice these refreshing video on JS! thanks
Brilliantly explained. Thank you!
Godlike explanation. Thanks a million
You are so amazing. So clear and concise explanations. I have one confusion right now though, I have learned from older updates of JS about constructor functions when creating new objects, so how are classes different from construct functions and when should I use classes and when should I use just plain constructor functions? Thanks man keep it up!
Don't use constructor functions now as classes are there.
Something worth watching Thnx for the Great Lesson ✌️ !
Woooooo.... Your explanation was AMAZING... Thank You...💝💝💝💝💝
You're welcome 😊
WOW! Putting across very nicely...!
Thank you! Cheers!
Awesome job explaining this!
OMG ,,,, this video is the best among 10 oop videos I already saw ,,,,,,, thanks bro
This man explained something actually no, he explained all I need to know. he needs like a 2m sub for the precise, accurate explanations he does. #ThisManIsALegend my teacher couldn't explain this...
nothing more to say alas I am at peace...
Beautiful explanation! Thank you
You're very welcome! :)
Thank you for the explanation! 🙌🏻 Good video
the "new" keyword let you create these {objects}. class is just syntactical sugar: try to instantiate a normal "function declaration" by using the "new" keyword and it will return the same value as long as you use "this" in declaring its properties(this.property = 'somevalue'). any normal function RETURNS "this:{prop1: value1, prop2: value2,...}" by DEFAULT as long as we use the "new" key word when instantiating. a CONSTRUCTOR inside a class does the same thing regarding this feature. the difference between a "class" and a "function declaration" is its naming convention as to where normal functions use "camelCase" but in class we use "PascalCase". in the early days the old Javascript engine inside our BROWSERS use functions similar to classes(today). this naming convention was made to avoid CONFUSION bet. a normal function vs a function being instantiated(new) with "this:{}" inside of it. normal functions does not RETURN "this" by default, only when instantiated using "new". Hope it helps.
Don't forget to mention that the 'new' keyword automatically returns the newly made object to the variable name that called the User class in the beginning.
What are the benefits using the new class syntax over simply using a constructor object on its own?
It makes the code when coming to inheritance between constructors (and other stuff) muuuch easier to read (and remember).
This was super helpful! thank you!
very solid explanation thank you
THIS HELPED SO MUCH! thanks
#The_Net_Ninja is the best teacher
Thanks! It’s really helpful! 🙏
Thank you man ! I now understand constructors ! Thumbs up to u !
Great explanation!
This was extremely helpful. Thank you!
Wow, totally get it now!!!!
thank you ver much for the very wel explained lessons. Great jon. A question on the var you use ? i did understand ( unless i am wrong ) that the old var was in more recent versions of JS replaced by the let and const because of ' scope ' reasons an the difference between var and let there . Is there a reason you use var here ? Would this also work with let ?
awesome video, keep em coming!, also I hope you also explain managing databases with OOP
this is what a ninja means
💯🔥godninja
great description thx sir keep up the great work
It just saved my life
Love you bro, you are truly a ninja! Love
Back With Visual Studio Code
great explanation...waiting for more...
Helpful thanks 👍
Wonderful pedagogy! Thank you
I subscribe!
Appreciate your videos
Short and sweet
😗
I love you, ma dude!
you're my favourite!
Nice!!!!
Man made it easy
Is there any real benefit to using classes over regular constructor functions to make a new object of a certain type?
Have you found the answer?
@@ayushuprety5676 Having methods come from the prototype rather than being part of every instance of the object you create will prevent unnecessary memory stores. I'm not sure how to word it but hopefully you can look it up! :)
@@Behold-the-Florist yeah thanks I got it
@@ayushuprety5676 :) All the best!
Thank you very much!
Thank you this helped alot
Hi Net Ninja, I noticed you mentioned ES6 standards for these courses but I noticed your still using var instead of let or const. Was the key and const added for ES6? Or am I mistaken?
good explanation
noticed you were still replying to comments so I just wanna say great tutorial, but also how do you get the notifications for caps lock? it seems pretty cool ngl
What are your thoughts on choosing composition over inheritance?
why most of the developers use constructor function and not the classes ? is using class is worth ?
Probably because they have it as a habit from ecmascript 5,i think classes look more elegant,and more efficient too;
Tnx a lot man. U just saved my ass. Subbed
thats the most easiest answer i got here in youtube.
carry on bro go on
love you too
love it
THE PRECISE EXPLANATION SO FAR!!!!!
You said the constructor function creates object, but then you later said the "new" creates object. Do they both create new object?
thanks