![]() ![]() Because when we use dot notation, we look, just like when we do multiply by 2.prototype, we'd find this empty object. We look for it on the associated object. notation, it may see an execution on it on the end here, but it's not we've got to go find this thing whatever it is, two string. > Will Sentance: In global, excellent, Elliot which bit of mode. > Will Sentance: Well, we've gotta find that thing first. Terry, talk me through the lookup process. We would never otherwise use it I don't think maybe. That if we ever were to try to run this function with a new keyword return out objects, which will always have a link to this object. It's a bit redundant, it's kind of weird why we always have it there just in case. Exactly, and the object, because it's a function-object, well, we know it has a prototype object as well, but we don't probably use that people, right? We don't use that bit unless we call 2 with a new keyword in front, which gives us our objects that have a link to that prototype object. > Will Sentance: Object combo exactly, and it's at this point like it's not, we got it. Okay, declaring a function multiply by two, help me out here man. ![]() > Will Sentance: No, I've got no room in my memory. > Elliott: We are declaring a function multiplied by two. Okay, so now let's walk through this code knowing that these bits are here. We did not declare, it was put in there for us. Okay, so not everything in orange, everything surrounded by orange. Besides cool anyone who, anyone think of others? Two string, it's got cool on it, that functions have access to. I just want to lay this out to start with. Multiply by 2.2 string, where's that two string coming from? Well, we'll play this out in a second. But where is that call coming from? It's not my multiply by two object. All the functions that we hope, any function will have access to. And that has in it, a whole bunch of functions. We're not gonna use this heavily, but I really want this to have like the core diagrammed version of what is the most like intricate, finicky parts of JavaScript, okay? This is a bit where I'm like, I just want to make sure you know about this. > Will Sentance: Has what property, David? They're just function object combos, but they're ones we get built in to JavaScript. And don't get confused by the fact they've got out the case. But of course it's therefore also, cuz a function object combo has all functions are. And this function object combo, yeah, it's a function hopefully. Which is, another function object combo with the label function. Before we do this, I'm going to tell you that when JavaScript loads, there's another thing that it gets for free. So,they get all the access to the functions and prototypes. > Will Sentance: Let's also see on that same note, arrays and functions are also objects. Transcript from the "Function.prototype and Array.prototype" Lesson ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |