It’s been 6 months I’ve started Javascript. I am stuck at Objects. I took break, watched some tutorial on Javascript. Specially I found OOP very confusing form those, I did not understand anything even when I tried many of the tutorials. Is it normal or its only me being lame? Please help? Any suggestion on this would highly be appreciated and thanks in advance for any help/
OOP in Javascript can be a difficult concept to grasp for anyone. Here is a beginner friendly intro to OOP and JavaScript.
Are there any specific questions about OOP you have?
You are not lame or stupid or anything of this kind.
Your brain needs to assimilate a lot of concepts and it needs some time to get its …-well yes- head around it.
Giving yourself a break is the right thing to do. It allows your brain to reformat its routes and make new understanding paths and that… takes time!!!
Hang in there!
All of this takes time, especially if it’s your first time being exposed to programming. Don’t give up! Keep practicing and you will get it!
Back in college I took some courses in Java that ended up working through most of a textbook on the subject. By the end of the intermediate course it was like a switch flipped and I was thinking in OOP whereas I had been approaching everything from a functional standpoint up until then.
I’ve gotten very rusty since then but have been working my way through the FCC curriculum, and I’ve also struggled with the OOP aspects of Javascript, so definitely don’t feel discouraged! I remember when I was working in Java that it took a lot of practice writing and thinking in that OOP mentality before things started to click. FCC excersizes are really only enough to scratch the surface tbh.
Not only that but OOP in Javascript can be a bit confusing because everything is already an object!
Yes sir, I am currently stuck on basics where object gets complicated. I tried tutorials on object, then found oop model but it is totally confusing.
It actually is my first programming language.
Try using the Ask for Help button so you can post your current code in the forum and people can give you hints to get you to the solution!
Yes, I’ve been doing that. but my habit is If I need to do that on 2-3 consecutive lessons, I’d rather repeat lessons so that I get more used to with easier version of it. and try to repeat the lesson until either I kind of memorize it or I start understanding where I was not getting things right and start smiling at my stupidity. Thus, I am stuck there. LoL. but this time it took longer, including 2 months of breaks in between.
Let’s put it this way: my personal pain point was answering questions about OOJS to people either new to coding, or new to JS, so I have been working for far too long (months) on a project that allows people to visually and kinesthetically learn how inheritance works in Javascript, compare it classical inheritance. I’ll be launching it next week some time, but here’s a preview, along with 3 things to keep in mind for any given object:
-
.constructor
: the function which, when used as the operand of thenew
operator, was used to create it, likelet HumVee = new Automobile();
-
.__proto__
: the object off of which the given object was copied when it was created. -
.prototype
: a property of a function that points to the object which should be copied and that copy returned when the function is used as a constructor (used as the operand of thenew
operator).
As you can see, constructor
and prototype
are inverse relationships, and properties that live on the complementary object (a function and the protoype it uses as a template, aka. a prototype, for new objects).