GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Modul 12 von 23 · Medien

Chain promises

Kostas Diakogiannis

Chain promises

Chaining multiple promises

What if we want to still go further and chain more promises? We can chain .then after another promise again. As seen, in line 19 we call the same function (that returns a promise) with the name of Jon Snow, so as we know after 3 seconds the ruler will change to Jon Snow.

Bear in mind: The inner function must return a promise, in order to chain with the .then function afterwards and console the 'Jon Snow' name.

Anleitung

Um im Kurs weiterzukommen, sende einen Versuch dieses Quiz ab. Du kannst ihn nach der letzten Frage absenden.

Zum gewählten Modul

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck