Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

extending classes javascript

class A {
  constructor(a) {}
  MethodA(){}
}

class B extends A {
 constructor(b) {
   super(b) // if you want to call constructor in class A
 }
 MethodB(){}
}
 
PREVIOUS NEXT
Tagged: #extending #classes #javascript
ADD COMMENT
Topic
Name
9+3 =