Module 12 of 23 · Media
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.