Question: JavaScript Write classes in javascript(ES5/ES6): Person and Student. Below are the requirements. 1. Person has two fields firstName and lastName 2. Person has one function
JavaScript
Write classes in javascript(ES5/ES6): Person and Student. Below are the requirements. 1. Person has two fields firstName and lastName 2. Person has one function sayHello() which prints his/her name 3. Students inherit Person. 4. Studeng has one filed score 5. Student instance can invoke sayHello() method to print his/her name and score.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
