Understanding JavaScript Class Inheritance, Inherit from Parent Class, Inheritance IV, Codecademy JS

Channel:
Subscribers:
7,740
Published on ● Video Link: https://www.youtube.com/watch?v=G3b7NGtlymI



Duration: 3:47
88 views
1


In this JavaScript lesson, we take a look at Understanding JavaScript Class Inheritance, Inherit from Parent Class, Inheritance IV, Codecademy JS. In it, we continue learning about Inheritance in JavaScript. We take a look at a parent class and a child class. We learn that our child class is able to inherit from a parent class. When a child class inherits from a parent class, it gets access to all the parent class' properties and methods. We give a child class access to a parent class' methods and properties using the extend keyword. We also learn that we are able to pass values into the constructor of our parent class, by using the super keyword. Using the super keyword allows us to pass in values from our child constructor to our parent constructor. Always running the super keyword first is important so that you can have access to "this". Once you have created your child class, you can then create an instance of your child class. Once you do, you will have access to all the properties and methods in the instance you create. We are able to see an example of that in our lesson. We have our parent class, HospitalEmployee and we create a child class, Nurse. We then create an instance of our Nurse and see how we would access our parent properties and methods! Make sure to practice creating class instances to make sure you understand before moving on to the next lesson!




Other Videos By We Will Code


2022-04-08How is PHP Executed, Writing a PHP Script File, Codecademy's Learn PHP, General Purpose Programming
2022-04-07How is PHP Used in HTML, Learn PHP, Codecademy, Build Dynamic Web Pages in PHP, The PHP Interpreter
2022-04-07The History of PHP, Learn PHP History, PHP History Explained for Beginners, Codecademy Learn PHP
2022-04-07Why Learn PHP, Introduction to PHP Programming Language, Codecademy Free Full PHP Programming Course
2022-04-05Node setTimeout Function JavaScript Promises Explained, Promises in JavaScript Explained, Codecademy
2022-04-04Learning how to use JavaScript Promises, Constructing a Promise Object, JavaScript Promise Example
2022-04-04Intro to JavaScript Promises, What is a Promise in JavaScript, Asynchronous Programming Codecademy
2022-04-04How to Import Modules in Node JS, Exporting Modules in Node JS, Use Modules with Require, Codecademy
2022-04-03Why Use Static Methods, Static VS Instance Methods JavaScript Walkthrough, JavaScript Static Methods
2022-04-01Add New Method to Child Class In JavaScript, Learn Intermediate JavaScript Inheritance V, Codecademy
2022-03-31Understanding JavaScript Class Inheritance, Inherit from Parent Class, Inheritance IV, Codecademy JS
2022-03-31First Time Ever Playing Destiny, PS4 Disc In PS5, Destiny Gameplay Guide for First Time Players
2022-03-30Inherit from a Parent Class, Super and Extends Keyword in JavaScript Codecademy's, Inheritance III
2022-03-30Jordan Peterson on Programming, Should I Learn to Program, Jordan Peterson on Coding and Technology
2022-03-30Playing A Plague Tale Innocence Walkthrough, Ch 2 The Strangers, Beginners Guide, New PS5 Games 2022
2022-03-29JavaScript Class Inheritance Explained, Codecademy's Learn Intermediate JavaScript, Inheritance II
2022-03-28How Class Inheritance Works in JavaScript, Class Inheritance in Programming, Codecademy's Learn JS
2022-03-28JavaScript Methods in Class Instance, Use Method Calls on JavaScript Class Instances, Codecademy JS
2022-03-27toggleClass JavaScript Walkthrough, How toggleClass Works in JavaScript, Toggle Class with jQuery
2022-03-27JavaScript Class Methods, How Methods Work in Classes, Learn JavaScript, Codecademy Classes in JS
2022-03-26Learn to Create Class Instances with JavaScript, Instantiate a Class in JavaScript Codecademy JS ES6



Tags:
Code
Coding
ES6
JavaScript
Programming
Tutorials