apl-mhd

Inheritance

Oct 29th, 2018
179
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.  
  3. function Person(first, last, age, gender, interests) {
  4.   this.name = {
  5.     first,
  6.     last
  7.   };
  8.   this.age = age;
  9.   this.gender = gender;
  10.   this.interests = interests;
  11. };
  12.  
  13.  
  14. function Teacher(first, last, age, gender, interests, subject) {
  15.   Person.call(this, first, last, age, gender, interests);
  16.  
  17.   this.subject = subject;
  18. }
  19.  
  20. </script>
RAW Paste Data