what I do not understand too well the classes
class FirstClass {
constructor() {
this.importantVar = '1234asd'
}
someFunction() {
alert(this.importantVar);
}
}
class SecondClass extends FirstClass {
constructor(importantVar) {
super();
this.justAnotherVar = 'ooooo';
}
iWannaImportantVar() {
alert(this.importantVar);
}
}
gasgasgas function() {
const firstClass = new FirstClass();
const secondClass = new SecondClass();
firstClass.someFunction();
secondClass.iWannaImportantVar();
}
gasgasgas();
Find more questions by tags JavaScript
To such questions I recommend to watch it. - Loyc commented on April 19th 20 at 12:31
Thanks for the video, look. - marisol.Cartwright commented on April 19th 20 at 12:34