Sistemas y Tecnologías Web: Servidor

Master de II. ULL. 1er cuatrimestre. 2020/2021


Organization ULL-MII-SYTWS-2021   Classroom ULL-MII-SYTWS-2021   Campus Virtual SYTWS   Chat Chat   Profesor Casiano

Table of Contents

new Promise(executor);

Parameters

executor

A function that is passed with the arguments resolve and reject.

The executor function is executed immediately by the Promise implementation, passing resolve and reject functions

(the executor is called before the Promise constructor even returns the created object).

The resolve and reject functions, when called, resolve or reject the promise, respectively.

The executor normally initiates some asynchronous work, and then, once that completes, either calls the resolve function to resolve the promise or else rejects it if an error occurred. If an error is thrown in the executor function, the promise is rejected.

To Exercises Description

The return value of the executor is ignored.

Comment with GitHub Utterances

Comment with Disqus

thread de discusion