codecademy javascript tutorial - class

in #javascript6 years ago

I'll modify this post with my comment!

Review: Classes
Way to go! Let's review what you learned.
• Classes are templates for objects.
• Javascript calls a constructor method when we create a new instance of a class.
• Inheritance is when we create a parent class with properties and methods that we can extend to child classes.
• We use the extends keyword to create a subclass.
• The super keyword calls the constructor() of a parent class.
• Static methods are called on the class, but not on instances of the class.
In completing this lesson, you've taken one step closer to writing efficient, production-level JavaScript. Good luck as you continue to develop your skills and move into intermediate-level concepts.
If you want extra practice with inheritance, take some time to create a Doctor class that inherits from HospitalEmployee. The properties and methods for the Doctor class are listed below:
Doctor
• properties: _name, _remainingVacationDays (set to 20inside constructor()), _insurance
• methods: .takeVacationDays()

Sort:  

@maestroprog, I gave you a vote!
If you follow me, I will also follow you in return!

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.029
BTC 76024.68
ETH 2926.23
USDT 1.00
SBD 2.60