JavaScript Simplified / Chapter 90 Exercises

  • Index of exercises
  • Email me

1

2

3

4

5

6

7

8

9

10

Congratulations. You've aced all the exercises for this chapter.


To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.


Are you ready to rate JavaScript Simplified? on Amazon?


Rate it on Amazon.

0,1,2,3,4,5,6,7,8,9

0

0

0

0

Fill in the blank to create a new class that builds on the class Nation. class AfricanNation ______ Nation { extends extends
Fill in the blank to create a new class that builds on the class Nation class AfricanNation _____________ { extends Nation extendsNation
Fill in the blank to create a new class, AfricanNation, that builds on the class Nation ____________ extends Nation { class AfricanNation classAfricanNation
Code the first line to create a new class that builds on another class. Make up the names. class AfricanNation extends Nation { class[A-Z][a-zA-Z0-9_$]*extends[A-Z][a-zA-Z0-9_$]*{
Fill in the blank. The parameters are name and language. class AfricanNation extends Nation {
  _____________________
    super(name, language);
  }
}
constructor(name, language) { constructor\(name,language\){
Fill in the blank. class AfricanNation extends Nation {
  constructor(name, language) {
    _______________
  }
}
super(name, language); super\(name,language\);
Fill in the blank. The parameters are name and language. class AfricanNation extends Nation {
  _____________________
    _________________
  }
}
  constructor(name, language) {
    super(name, language);
constructor\(name,language\){[\r\n]super\(name,language\);
Create a new class, AfricanNation, that builds on the class Nation. The parameters are name and language. class AfricanNation extends Nation {
  constructor(name, language) {
    super(name, language);
  }
}
classAfricanNationextendsNation{[\r\n]constructor\(name,language\){[\r\n]super\(name,language\);[\r\n]}[\r\n]}
  1. I've coded a class. Create a new class that builds on the class that I've coded.
  2. Use the new class to create a new object.
  3. Call the method of the new object.
  4. Wait a moment.
  5. If you've coded correctly, an alert will display the animal's name.
  6. Dismiss the alert by clicking OK.
  7. For help with this code, see Chapter 90 in the book.
  1. Create a class.
  2. The class has one parameter and one method.
  3. The method assigns the value of the parameter to a variable in the usual way.
  4. The method displays the value of the variable in an alert.
  5. Create a new class that builds on the first class.
  6. Use the new class to create a new object.
  7. Call the method of the new object.
  8. Wait a moment.
  9. If you've coded correctly, an alert will display the value.
  10. Dismiss the alert by clicking OK.
  11. For help with this code, see Chapter 90 in the book.