In this JavaScript tutorial you will learn about object constructors which are used to create multiple instances of an object. We use this in JavaScript when we need to create copies of an object in a way that doesn’t require us to create a new object each time.
In the next video I will create a “game” project where we will create a RPG/Battle style game in the browser using JavaScript.
➤ CHECK OUT THESE AWESOME PEOPLE!
Meet Daniel: another Full-Stack developer who can teach you coding fast and free 😀
https://www.youtube.com/channel/UCPIe87uLDW-QZ5FnUZqdxoA
➤ GET ACCESS TO MY LESSON MATERIAL HERE!
First of all, thank you for all the support you have given me!
I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.
I hope you will find it helpful 🙂
Material for this lesson: https://www.patreon.com/posts/javascript-22-19543291
Original source
32 responses to “22: How to Create Object Constructors | Object Constructors in JavaScript | JavaScript Tutorial”
How do we contact you sir
Where have I been! All I can say is thank you! Your tutorials are nothing like numerous boring tutorials that I've watched. I actually get it! Thanks!!
WOW. so well explained, only useful details. Thanks from Brazil
Already Completed your both Javascript Playlist and Jquery is in Queue. Thanks ! (Like Your Dog and your hairstyle Bro !)
total newb here but how do you connect this to if statements
function Person(name, age, color){
this.name= name;
this.age= age;
this.color= color;
this.updateAge= function(){
return ++ this.age;
};
}
let person1 = Person("a", 12, "white");
let person2 = Person("b", 25, "bkack");
console.log(person1.updateAge());
i wrote this cant run it says undefine function pls help
I love your exercises part! I think they make your tutorials unique from others'! if that makes sense :p
Love your tutorials. Thank you for the information!
What if we want to console all the persons in the object, not just person01 but all of them at one time. How do we do it ?
So a function is an Object?
Very helpful. Thank you.
please make more exercises senpai, we may know the basics but we don't know how to apply it on the app :-((
Very good, thank you !
you are really good teacher but in this lecture you didn't keep the order of the lessons
love it!
Awesome Daniel 💙
Very informative, thank you so much! Keep up the great work!
Still best quality channel in youtube like ur style in these videos they seem like premium stuff
Thanks for making these videos!! You’re a great teacher. I look forward to the next video :).
Which software are you using for html and CSS?? Is it Dreamweaver??
Hello Daniel, you are doing an amazing job here! Thank you so much. You are one of the best online tutor i have ever come across! I am enjoying this tutorial a whole lot. I can wait till we are done to see how much i will be able to learn under your tutelage!
This is the same for PHP
You are awesome my friend On behalf of everyone, thankyou 🙂
ur very nice, if that make sense:)
Colouuuuur
Daniel, you are really a great teacher. you understand what its like to be seeing some of this stuff for the first time and that is great. seems like javascript has changed a lot over the past couple of years. at once it seemed all about events and updating web pages. objects was one of those things people never talked much about in a beginners class. The whole idea of JS is sorta like and endless journey. it make me feel like no matter what we learn, there is always more. when does a person know JS….that is a question you should do a video on in my opinion. what is the end goal so to speak.
var js= 5150
if (js == 5150)
{alert( "the boy's mind got hung in an endless loop ");}
else{alert( "all is well that ends well");}
Love you guys! Can u make a chit-chat like video with Tom Scott? I think he would be really interested in.
How similar is C# in accordance to JS ? I've seen that Unity doesn't support js anymore . Should i change game engine or learn Js for web development only ?
Awesome!
This looks almost like ajax
Awesome like all you videos, the title is not 22 ?
Mener du ikke det skulle være #22 i stedet for #21? 🙂