Javascript Classes Explained - Javascript Factory Functions - ES6 Private Variables Properties
Offered By: Dave Gray via YouTube
Course Description
Overview
Syllabus
Classes are "syntactic sugar" in JS
Creating a simple class with a constructor
Using the keyword this
Adding a method to the class
Classes are templates / blueprints for objects
Using the new keyword to create the object
Calling the object's method
Adding parameters to the constructor
Passing multiple parameters to the constructor
Accessing properties with dot notation
getters and setters
A more readable getter and setter method
An array property with a getter and setter
A parent "super" class
Creating a child class with extends
The super keyword
No need to create a parent object in order to create a child object from the classes
A naming convention for private properties
Good intentions but not enforced by the code
Factory Functions
Instantiating a pizza factory object
Factory Functions solve the private properties problem
New additions to JS allow public and private class fields
How much support for public and private class fields?
Taught by
Dave Gray
Related Courses
Introduction à la programmation orientée objet (en Java)École Polytechnique Fédérale de Lausanne via Coursera Useful Genetics Part 2
The University of British Columbia via Coursera Object-Oriented Programming
Indian Institute of Technology Bombay via edX Java für Einsteiger
openHPI Computing: Art, Magic, Science - Part II
ETH Zurich via edX