JavaScript the Hard Parts: Classes and Prototypes (OOP)

Поделиться
HTML-код
  • Опубликовано: 10 авг 2023
  • Join us at our live Javascript workshops every week: app.codesmith.io/coding-events
    During this workshop, East Coast Remote Immersive Lead Instructor Ryan McDaniel covers Object-Oriented Programming in JavaScript by going under the hood of OOP and the prototype chain.
    Ryan covers:
    - 4 approaches to object-oriented programming in JavaScript
    - Prototype and the prototype chain
    - Factories, constructors and classes
    - ES5 and ES6 approaches
    Stay connected to our community!
    Codesmith: www.codesmith.io/
    Learn JavaScript for Free: csx.codesmith.io/
    Free Weekly Events & Workshops: app.codesmith.io/coding-events
    Follow us to stay updated!
    Facebook: / codesmithhq
    Instagram: / codesmithio
    Twitter: / codesmith_
    LinkedIn: / codesmith-llc
    TikTok: / codesmith.io
    #learntocode #javascript #programminglanguage #coding #softwareengineer #code #objectorientedprogramming
  • НаукаНаука

Комментарии • 8

  • @tshirtphilosophers
    @tshirtphilosophers 6 месяцев назад +1

    I used to be so confused about "this". Your video was so helpful :)

    • @Codesmith
      @Codesmith  5 месяцев назад +1

      Happy to hear this was helpful for you!!

  • @welium123
    @welium123 10 месяцев назад +3

    Such a helpful video, Ryan is a great instructor!

  • @rnarud
    @rnarud 10 месяцев назад +1

    Awesome instructor ! Really enjoyed watching this Hard Parts session

  • @k0secha
    @k0secha 10 месяцев назад +2

    Ryan is awesome! i watched two other ones and this is the one that made prototypes click. I like how he keeps people engaged by being funny af too. Oh and my eyes are so grateful that he uses notability in dark mode!

    • @Codesmith
      @Codesmith  9 месяцев назад +2

      Great shout - we should all try the notability dark mode

  • @luciusrex
    @luciusrex 6 месяцев назад +1

    this was great! thanks for sharing this. its what i needed. how do you ensure the methods in each new instance is kept (for use later) when you extract the new instances as JSON?

    • @Codesmith
      @Codesmith  6 месяцев назад +1

      Hey @luciusrex - glad to hear this was so helpful!! JSON is great for storing and transmitting data but can get very complicated when it comes to types/prototypes. It’s not currently possible to preserve a prototype when stringifying + parsing JS code, but you _could_ reconstruct one using a ‘reviver’ function - check out the MDN docs for more details! developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse