then()
Promise.then, then, на сайте с December 14, 2022 21:51
The then() method returns a Promise. It takes up to two arguments: callback functions for the fulfilled and rejected cases of the Promise. If the function passed as handler to then returns a Promise, an equivalent Promise will be exposed to the subsequent then in the method chain. The below snippet simulates asynchronous code with the setTimeout function.