Object-oriented Programming in JavaScript: Made Super Simple | Mosh




🔥Get the COMPLETE course (70% OFF – LIMITED TIME): http://bit.ly/2keDCna

Object-oriented programming in JavaScript: learn all about objects, prototypes, prototypical inheritance, this and more.

Subscribe for more videos:
https://www.youtube.com/channel/UCWv7vMbMWH4-V0ZXdmDpPBA?sub_confirmation=1

TABLE OF CONTENT:

00:00: What is OOP?
01:46: Four Pillars of OOP
08:50: Setting Up the Development Environment 11:07: Objects
11:53: Object Literals
14:58: Factories
17:50: Constructors
23:27: Constructor Property
25:53: Functions are Objects
31:09: Value vs Reference Types
37:00: Adding or Removing Properties
40:54: Enumerating Properties
43:45: Abstraction
47:48: Private Properties and Methods
51:55: Getters and Setters
57:32: Exercise
59:42: Solution

Want to learn more from me? Check out my blog and courses:

http://programmingwithmosh.com
https://www.facebook.com/programmingwithmosh/


Original source


22 responses to “Object-oriented Programming in JavaScript: Made Super Simple | Mosh”

  1. Hi, I have a question, why are we defining getters and setters for private variables of objects when they are just temporary variables, I mean their value disappear after calling the function right? for example if we call the setter to set defaultLocation to x:1, y:1, That will create the variable defaultLocation, accord the values 1,1 to x and y then defaultLocation will disappear beacause it's not a property. I hope you got what I'm saying, thank you!

Leave a Reply