More Flashcards
https://launchschool.com/exercises/cf45546d
Specifically, how do you implement the cat introduce method
introduce() {
return ${super.introduce()} Meow meow!
;
}
https://launchschool.com/exercises/6d2071cb
https://launchschool.com/exercises/6d2071cb
https://launchschool.com/exercises/10d9143d
https://launchschool.com/exercises/10d9143d
https://launchschool.com/exercises/b6dd0e20
https://launchschool.com/exercises/b6dd0e20
https://launchschool.com/exercises/2b521c67
https://launchschool.com/exercises/2b521c67
https://launchschool.com/exercises/a94dfdc1
Anywhere outside a function, the keyword this is bound to the global object. If the keyword is used inside a function, then its value depends on how the function was invoked.
https://launchschool.com/exercises/a94dfdc1
Explain why this doesn’t work:
let franchise = {
name: ‘How to Train Your Dragon’,
allMovies: function() {
return [1, 2, 3].map(function(number) {
return this.name + ‘ ‘ + number;
});
},
};
[incomplete]
https://launchschool.com/exercises/4455e4ab
Do you need super()?
No
Why?
Using super is always redundant. If the subclass doesn’t have a constructor function, it implicitly calls super with any passed arguments.
https://launchschool.com/exercises/0927135d
https://launchschool.com/exercises/0927135d
https://launchschool.com/exercises/9e05ae71
https://launchschool.com/exercises/9e05ae71
https://launchschool.com/exercises/b745f609
https://launchschool.com/exercises/b745f609
https://launchschool.com/exercises/7f3cd322
https://launchschool.com/exercises/7f3cd322
https://launchschool.com/exercises/0a8aaa5c
https://launchschool.com/exercises/0a8aaa5c
they serve as placeholders for functions and methods to be written or removed later. They don’t have any useful functionality yet; most are either empty or return a constant value.
//STUB
https://launchschool.com/lessons/93a83d87/assignments/56f620e5#:~:text=and%20earlier%20are-,stubs,-%3B%20they%20serve%20as
a general outline of how the program flows. They take a high-level view, focusing on the general logic of the program; they don’t concern ourselves with details like what it means for the game to be over.
//SPIKE
https://launchschool.com/lessons/93a83d87/assignments/56f620e5#:~:text=and%20write%20a-,spike,-%2D%2D%20some%20exploratory%20code