JSFiddle - React, Tailwind, and code Playground

by Alexander

JavaScript

console.clear();

var promise = new Promise(function(resolve) {
    setTimeout(function() {
        resolve('The time machine worked!');
    }, 2014);
});

promise.then(function(result) {
    console.log('Promise resolved.', result);
});