DEV Community

Christian Falucho
Christian Falucho

Posted on • Updated on

Day 5 of #100DaysOfCode!

Today's progress🧢

Did some more exercises on constructors from freeCodeCamp.

What I learned

Constructors are functions that create new objects and they define properties and behaviors that belong to the new object.

They are to be defined with a capitalized name to distinguish them from other functions that are not constructors.

Here is an example of the Car constructor capitalized.

function Car(){
}
Enter fullscreen mode Exit fullscreen mode

Constructors use the keyword this to define properties of the object they will create. Referring to the new object they will create.

function Car(){
   this.color = "black";
   this.make = "Lexus";
   this.model = "IS 250";
}
Enter fullscreen mode Exit fullscreen mode

Top comments (5)

Collapse
 
iammalan profile image
iamMalan

How many hours you usually study Programming?
Keep it up!

Collapse
 
cfalucho profile image
Christian Falucho

Hi there! I am making it a habit to study programming for an hour a day. Truly appreciate it! I'm new to this 100 days of code thing and am trying to become better at writing and tackle on basic fundamentals. Any kind of suggestions or feedback is highly recommended!

Collapse
 
iammalan profile image
iamMalan

I'm also a newbie. But, I think it's better if you coverup some cs topics while you study programming(data structures, OOP) It really helps us to understand how code works... Good luck!

Thread Thread
 
cfalucho profile image
Christian Falucho

Any recommendations on any particular resources for data structures? I have not taken any courses with DS in college and would really like to improve on them. To be more specific data structures and algorithms. I picked up several books on them but they been collecting dust. So maybe ill pick them up again. But I appreciate it! Best luck to you as well!

Thread Thread
 
iammalan profile image
iamMalan

If you want to have the basic idea of what are data structures, watch the introduction series of data structures on FreeCodeCamp YouTube channel. Also, you can find OOP and Algorithm introductory courses there. I finished watching both of those video series last week. Those really help me to understand coding so much better. Keep up! Do more projects btw