1
2
3
4
5
6
7
8
9
10
To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.
0,1,2,3,4,5,6,7,8,9
0
0
0
0
Fill in the blank to add the language2 property to the child class. | class AfricanNation extends Nation { constructor(name, language, language2) { super(name, language); this.language2 = ___________ } } |
language2; | language2; |
Fill in the blank to add the language2 property to the child class. | class AfricanNation extends Nation { constructor(name, language, ___________) { super(name, language); this.language2 = language2; } } |
language2 | language2 |
Fill in the blank to add the language2 property to the child class. | class AfricanNation extends Nation { constructor(name, language, language2) { super(name, language); ______________________ } } |
this.language2 = language2; | this\.language2=language2; |
Fill in the blanks to include two properties from the parent class and add the language2 property to the child class. | class AfricanNation extends Nation { constructor(name, language, language2) { ____________________ ______________________ } } |
super(name, language); this.language2 = language2; |
super\(name,language\);[\r\n]this\.language2=language2; |
Fill in the blanks to include the name and language properties from the parent class and add the language2 property to the child class. | class AfricanNation extends Nation { ___________________________ ____________________ ______________________ } } |
constructor(name, language, language2) { super(name, language); this.language2 = language2; |
constructor\(name,language,language2\){[\r\n]super\(name,language\);[\r\n]this\.language2=language2; |
Copy a single property from a parent class to a child class and add one property that's unique to the child class. Make up everything. | class AfricanNation extends Nation { constructor(name, language) { super(name); this.language = language; } } |
class[A-Z][a-zA-Z0-9_$]*extends[A-Z][a-zA-Z0-9_$]*{[\r\n]constructor\(([a-z_$][a-zA-Z0-9_$]*),([a-z_$][a-zA-Z0-9_$]*)\){[\r\n]super\(\1\);[\r\n]this\.\2=\2;[\r\n]}[\r\n]} | |
Copy a single property from a parent class to a child class and add one method that's unique to the child class. The method does nothing. Make up everything. | class AfricanNation extends Nation { constructor(name) { super(name); } doNothing() { } } |
class[A-Z][a-zA-Z0-9_$]*extends[A-Z][a-zA-Z0-9_$]*{[\r\n]constructor\(([a-z_$][a-zA-Z0-9_$]*)\){[\r\n]super\(\1\);[\r\n]}[\r\n][a-z_$][a-zA-Z0-9_$]*\(\){[\r\n]}[\r\n]} | |
Copy a single property from a parent class to a child class and add one method that's unique to the child class. The method displays the value of the property in the console. Make up everything. | class AfricanNation extends Nation { constructor(name) { super(name); } showValue() { console.log(this.name); } } |
class[A-Z][a-zA-Z0-9_$]*extends[A-Z][a-zA-Z0-9_$]*{[\r\n]constructor\(([a-z_$][a-zA-Z0-9_$]*)\){[\r\n]super\(\1\);[\r\n]}[\r\n][a-z_$][a-zA-Z0-9_$]*\(\){[\r\n]console\.log\(this\.\1\);[\r\n]}[\r\n]} | |
|
|||
|