We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dedfbd9 commit 464250eCopy full SHA for 464250e
code-snippets/promises.md
@@ -217,4 +217,38 @@ examplePromise
217
218
---
219
220
+<li>
221
+
222
+**What is the output?**
223
224
+```JS
225
+new Promise((resolve, reject) => {
226
+ console.log(4)
227
+ resolve(5)
228
+ console.log(6)
229
+}).then(() => console.log(7))
230
+.catch(() => console.log(8))
231
+.then(() => console.log(9))
232
+.catch(() => console.log(10))
233
+.then(() => console.log(11))
234
+.then(console.log)
235
+.finally(() => console.log(12))
236
+```
237
238
+- A: `4 6 7 9 11 12`
239
+- B: `4 6 7 9 11 undefined 12`
240
+- C: `4 6 8 12`
241
242
+<br/>
243
+<details>
244
+<summary><b>Answer</b></summary>
245
+<p>
246
247
+#### Option: B
248
249
+</p>
250
+</details>
251
+</li>
252
253
254
</ol>
0 commit comments