This course has been updated! We now recommend you take the JavaScript: The Hard Parts, v2 course.

Check out a free preview of the full JavaScript: The Hard Parts course:
The "Object.prototype Q&A" Lesson is part of the full, JavaScript: The Hard Parts course featured in this preview video. Here's what you'd learn in this lesson:

Will takes a question from a student about the difference between __proto and prototype.

Get Unlimited Access Now

Transcript from the "Object.prototype Q&A" Lesson

>> Will Sentance: Let's have thumbs, this is hard stuff. This is complicated. It's not conceptually as demanding as closure, but it's just bloody complicated. Yup.
>> Speaker 2: I don't know if they're quick, but-
>> Will Sentance: Can I look at them on here as well? I haven't pulled them up on here as well.

[00:00:16] Well, the first one, the difference between object underscore proto underscore. We can see the difference between user 2 underscore, underscore proto underscore, and this guy prototype up here. These are the two fundamentally, this is why I don't love calling, saying user 2's prototype are these functions up, is this object up here.

[00:00:37] I don't love saying that for the very reason that underscore proto underscore is the reference created, whereas prototype is the set of functions that we want our object to get returned from user creator to have access to in the_project_property, okay? And the other question. Is there a difference between the use in values you use to create the values the one you use?

[00:01:03] Yeah, Alex, the first one is going to call user creator, but you still have to call the function, okay? And yeah, exactly. As Rishab says, new calls a function, you have to call the function. Okay, all right.
>> Will Sentance: Okay, at this point we're at 350. I think, we're gonna see, while it's all fresh in our mind.

[00:01:30] We're gonna see one final, let's have funds first. I don't know what happened here, clarification, move me along, move me along. Everyone stands out, it's good to have clarifications. Griffin has a clarification. Shelby, Griffin, go ahead.
>> Griffin: So if you wanted to put an increment function when you declared the user create function, can you do it at that point, or do you have to do user creator.prototype.increment equals function?

>> Will Sentance: You're like, hold on, can I just sort of in-user create an? It was in Python or other languages, we put it all there, don't we?
>> Griffin: Yeah.
>> Will Sentance: Not in JavaScript.
>> Griffin: No, okay.
>> Will Sentance: Or wait, thank you for teeing up Solution 4. So people who don't know the languages go, well, let's see first benefits, faster to write.

[00:02:14] This is still standard practice in modern JavaScript. Negatives, 9 out of 10 developers have no idea how it works and therefore do not pass senior interviews. This stuff is required. Again to code smith, well, not so much. This stuff is day three of code smith. You need to know this stuff to get a senior developer position.

[00:02:34] You need to know this stuff to get a mid-level developer position. You have to have these pieces down.