diff --git a/ejercicio3.js b/ejercicio3.js new file mode 100644 index 0000000..a17985c --- /dev/null +++ b/ejercicio3.js @@ -0,0 +1,9 @@ +let promise = new Promise(function (fulfill, reject) { + setTimeout(()=>reject(new Error("REJECTED!")),300) + }); + + function onReject (error) { + console.log(error.message) + } + + promise.then(null,onReject); \ No newline at end of file