JavaScript Simplified / Chapter 106 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

The name of the promise is prom. Fill in the blank. ___________(function(message) {
  console.log(message);
}).catch(function(message) {
  console.log(message);
});
prom.then prom\.then
Fill in the blank. prom.then(_________(message) {
  console.log(message);
}).catch(function(message) {
  console.log(message);
});
function function
Fill in the blank. prom.then(____________ {
  console.log(message);
}).catch(function(message) {
  console.log(message);
});
function(message) function\(message\)
Fill in the blank. The name of the promise is prom. _________________________
  console.log(message);
}).catch(function(message) {
  console.log(message);
});
prom.then(function(message) { prom\.then\(function\(message\){
Fill in the blank. prom.then(function(message) {
  console.log(_______);
}).catch(function(message) {
  console.log(message);
});
message message
Fill in the blank. prom.then(function(message) {
  console.log(message);
})_______(function(message) {
  console.log(message);
});
.catch \.catch
Fill in the blank. prom.then(function(message) {
  console.log(message);
________(function(message) {
  console.log(message);
});
}).catch }\)\.catch
Fill in the blank. prom.then(function(message) {
  console.log(message);
________________________
  console.log(message);
});
}).catch(function(message) { }\)\.catch\(function\(message\){
  1. Replace the asterisks with the correct line of code.
  2. Click the Result button (or, after revising, don't click, just wait).
  3. Wait a moment.
  4. If you've coded correctly, an alert will display the message.
  5. Dismiss the alert by clicking OK.
  6. For help with this code, see Chapter 106 in the book.
  1. Below my code, code the rest of the promise.
  2. Click the Result button (or, after revising, don't click, just wait).
  3. Wait a moment.
  4. If you've coded correctly, an alert will display the message.
  5. Dismiss the alert by clicking OK.
  6. For help with this code, see Chapter 106 in the book.