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. | const prom = _________(function(resolve, reject) { | new Promise | newPromise |
Fill in the blank. Make up the name of the promise. | __________ = new Promise(function(resolve, reject) { | const prom | const[a-z_$][a-zA-Z0-9_$]* |
Fill in the blank. Make up the name of the promise. | _____________________(function(resolve, reject) { | const prom = new Promise | const[a-z_$][a-zA-Z0-9_$]*=newPromise |
Fill in the blank. | const prom = new Promise(__________________) { | function(resolve, reject | function\(resolve,reject |
Code the first line of a promise. Make up the name of the promise. | const prom = new Promise(function(resolve, reject) { | const[a-z_$][a-zA-Z0-9_$]*=newPromise\(function\(resolve,reject\){ | |
Fill in the blank. Make up the name of the message. | const prom = new Promise(function(resolve, reject) { let pet = "cat"; if (pet === "cat") { ________________________________ } else { reject("Something is wrong"); } }); |
resolve("All is well"); | resolve\(•.*•\); |
Fill in the blank. Make up the message. | const prom = new Promise(function(resolve, reject) { let pet = "cat"; if (pet === "cat") { resolve("All is well"); } else { ___________________________________ } }); |
reject("Something is wrong"); | reject\(•.*•\); |
Fill in the blanks. Make up the messages. | const prom = new Promise(function(resolve, reject) { let pet = "cat"; if (pet === "cat") { ______________ _______ __________________ __ }); |
resolve("All is well"); } else { reject("Something is wrong"); } |
resolve\(•.*•\);[\r\n]}else{[\r\n]reject\(•.*•\);[\r\n]} |
|
|||
|