Understanding JavaScript's Prototypal Inheritance
Offered By: egghead.io
Course Description
Overview
How do inherent prototypes work?
You might not think this question applies to you, especially if you come from a classical background. But if you use objects, functions, or arrays, you're probably already using prototypes, and can benefit from learning the logic behind them.
This course explores the mechanics of inheritance in JavaScript by showing how prototypes work as chained references to other objects. Learn to take full advantage of prototype shortcuts to make your work simpler and faster…and debug them if you hit a snag.
We’ll explore:
how to manipulate prototypes to work like traditional classes
how polymorphism and factory functions can be used within JavaScript
how the class, new, and this keyword work and how to use them
using the instanceof, Object.create, and Object.getPrototypeOf functions to explain why objects have the properties that they do
Develop the knowledge needed to use inheritance for faster, better, bug-free code.
You might not think this question applies to you, especially if you come from a classical background. But if you use objects, functions, or arrays, you're probably already using prototypes, and can benefit from learning the logic behind them.
This course explores the mechanics of inheritance in JavaScript by showing how prototypes work as chained references to other objects. Learn to take full advantage of prototype shortcuts to make your work simpler and faster…and debug them if you hit a snag.
We’ll explore:
how to manipulate prototypes to work like traditional classes
how polymorphism and factory functions can be used within JavaScript
how the class, new, and this keyword work and how to use them
using the instanceof, Object.create, and Object.getPrototypeOf functions to explain why objects have the properties that they do
Develop the knowledge needed to use inheritance for faster, better, bug-free code.
Syllabus
- Introduction to Prototypal Inheritance in JavaScript
- Link to Other Objects through the JavaScript Prototype Chain
- Prototype Delegation with JavaScript's new Keyword
- Understanding the .constructor property on JavaScript Objects
- Understand JavaScripts this keyword within Prototypes
- Use JavaScript's for-in Loop on Objects with Prototypes
- Compose Objects with Object.assign to Create a Direct Copy
- Understanding Prototype Delegation within JavaScript's Class Keyword
- Assign and Access Methods of a JavaScript Class with Static Properties
- Determine an Object's Constructor with JavaScripts instanceof Operator
- Create Factory Functions for Object Composition
- Use Polymorphism with Prototype Linked Objects
- Replicate JavaScript Constructor Inheritance with Simple Objects (OLOO)
Taught by
Tyler Clark
Related Courses
Functional Programming Principles in ScalaÉcole Polytechnique Fédérale de Lausanne via Coursera Introduction à la programmation orientée objet (en Java)
École Polytechnique Fédérale de Lausanne via Coursera Functional Program Design in Scala
École Polytechnique Fédérale de Lausanne via Coursera Object-Oriented Programming
Indian Institute of Technology Bombay via edX Orientação a Objetos com Java
Instituto Tecnológico de Aeronáutica via Coursera