Five Important Concepts for Understanding JavaScript Constructors

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024

ความคิดเห็น • 31

  • @tigranhakobyan5641
    @tigranhakobyan5641 4 ปีที่แล้ว +4

    Very well explained, my English is not perfect , but I understand everything you explain in you videos

  • @rakibul1765
    @rakibul1765 4 ปีที่แล้ว +1

    though this page has less subscription, less view but I always fallow this page. one of favorite teacher on Javascript.

  • @rotrose7531
    @rotrose7531 4 ปีที่แล้ว +1

    Most clearly explained new and this keyword. Thank you for sharing your expertise with all of us.

  • @ilovecoffee7623
    @ilovecoffee7623 3 ปีที่แล้ว

    I really wish you would've done a video about what is a constructor function exactly, and in particular, what is a constructor, how does it work, and what does it store. I am confused as to why when I add a new method directly to the instantiated object, why is it not shown in the constructor when I access through the prototype property.

    • @AllThingsJavaScript
      @AllThingsJavaScript  3 ปีที่แล้ว

      I have tutorials on prototypes. I think that will help. th-cam.com/video/EatF4GfENiQ/w-d-xo.html

  • @Slaughter327
    @Slaughter327 7 ปีที่แล้ว +1

    This helped me so much, can't wait to watch the rest of your videos. I've watched hundreds of hours of tutorials over the past few years learning front end development and these are among the best.

  • @shabnamnaaz4676
    @shabnamnaaz4676 4 ปีที่แล้ว +1

    amazing , this channel needs deserves more subs and views

  • @jayt2257
    @jayt2257 4 ปีที่แล้ว +1

    prototype didn’t work for me using a mobile javascript environment, coded on Javascript coding app for iPhone. console.log(user2.fullName) displayed the actual contents of prototype function instead of processing it’s algorithm

    • @AllThingsJavaScript
      @AllThingsJavaScript  4 ปีที่แล้ว +1

      You need to put parentheses to cause the method to invoke. user2.fullName() Is that what you are trying to do?

    • @jayt2257
      @jayt2257 4 ปีที่แล้ว

      All Things JavaScript, LLC that did it! thank you!

  • @harleyjean6287
    @harleyjean6287 6 ปีที่แล้ว +1

    Amazing and concise, Thank you for this !

  • @paxdriver
    @paxdriver 6 ปีที่แล้ว

    thank you for showing proper use of the console! Very lacking in online tuts.

  • @andreiconstantinescu9830
    @andreiconstantinescu9830 6 ปีที่แล้ว +1

    I loved it! The voice, the explanation, the pace, it's well balanced.
    I will now bounce back to 'How do I Set the Prototype of an Object'.
    Thank you!
    SUB+Like

  • @gregcampbell4467
    @gregcampbell4467 2 ปีที่แล้ว

    The function joined the prototype because function definitions are hoisted. If it had been a function expression it would only be defined in user2

    • @AllThingsJavaScript
      @AllThingsJavaScript  2 ปีที่แล้ว +2

      fullName is actually a method assigned to the constructor function object. Hoisting does not come into play here. The reason it shows on both is because it is attached to the prototype. When we look at the prototype you can see that it is there.

  • @siyadeveloper
    @siyadeveloper 3 ปีที่แล้ว

    It's an awesome teaching.

  • @aleksandarantonic
    @aleksandarantonic 6 ปีที่แล้ว +1

    Great video thank you for the effort!!! Greetings from Serbia :)

  • @blackpurple9163
    @blackpurple9163 ปีที่แล้ว

    If we're using 'this' keyword in a (not arrow function, a regular function) function that's inside a function that's inside another function and so on (all regular functions and not arrow functions)... For multiple levels all of which are inside an object/array, does 'this' still bind to the object/array even though it's deep within multiple layers of functions inside that object/array?

    • @AllThingsJavaScript
      @AllThingsJavaScript  ปีที่แล้ว +1

      So the important thing to remember with regular functions is that how it is invoked determines the this binding; not where it is placed. So it all depends on how it is invoked.

    • @blackpurple9163
      @blackpurple9163 ปีที่แล้ว

      @@AllThingsJavaScript have you made a video about it? If you have I'll find it eventually, but if you haven't, you should make one (I think it'll be shorter than 3 minutes at best) also invoking vs calling (I read on w3schools but didn't get the difference properly)

    • @AllThingsJavaScript
      @AllThingsJavaScript  ปีที่แล้ว +1

      @@blackpurple9163 invoking and calling are used interchangeably in most places. Some differentiate the two: invoking (when a function gets called automatically) calling (you call it in your code). I don't worry about the differentiation. A talk about the this keyword in a lot of my tutorials as it can be somewhat complex in JavaSCript. However, I don't think I have one that focusses just on the keyword this. I have done that in some of my courses, but I don't think I have done it here yet. A good one to add to my list.

    • @blackpurple9163
      @blackpurple9163 ปีที่แล้ว +1

      @@AllThingsJavaScript ok so I don't need to think too deep into invoking vs calling except under very specific situations, good to know, I'm enjoying your videos very much, it's making understanding JavaScript much easier, I found your channel yesterday and already watched a few of your videos (of course subscribed as well) and a lot of concepts are clear now, thank you

  • @seenuvasanv
    @seenuvasanv 6 ปีที่แล้ว

    Thanks

  • @nikki4675
    @nikki4675 2 ปีที่แล้ว

    i think ur recording audio with too much gain almost deafened me wearing headphones

  • @webstuff56
    @webstuff56 6 ปีที่แล้ว

    did you bother to look at your video as a check; apparently not! we cannot see any coding for the first three cases

    • @AllThingsJavaScript
      @AllThingsJavaScript  6 ปีที่แล้ว +1

      I do take time to edit and view the video before I publish. I looked at this video again and I'm seeing the code to explain those. I explain a couple of them together.

    • @webstuff56
      @webstuff56 6 ปีที่แล้ว

      you sure do and do a great job; and at a second review I can see the entire video. M apologizes

  • @rajendrapandey1639
    @rajendrapandey1639 3 ปีที่แล้ว

    How come your thumbnail pic looks like an old man & your voice sounds like a teenager?? Confused..