CSE 134B Lecture Notes - Lecture 7: Jquery

81 views4 pages

Document Summary

Classes - classes are just functions! typeof keyword - shows the type of a variable. Ex: task instanceof task showid() inside class task task. showid === task. prototype. showid. Js class method is default to the prototype of the class constructor() inside class task. When creating an instance of the task, the constructor will be called. Note: must declare class before using it! let taskclass = class task {} new taskclass(); Creating a class will not populate the object to the global window. Base ctor is called when instantiating the child class (w/ or w/o parameter values!) Assign a class to a variable super(); There is a default hidden base ctor in the parent class. Children can call methods from its parent class! In the case of the same methods in both classes, the child will call its own method! ( no need for override ) To call the parent"s method w/ the same name, use super. methodname()

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents