JSFiddle - React, Tailwind, and code Playground

by 3gwebtrain

JavaScript

var d = $.Deferred(),
    promise = d.promise();

var newPromise = promise.then(
    null,
    null,
    function(value){
        return Math.round(value * 150.0) + '%';
    }
);

newPromise.progress(function(value){
    console.log('Progress:', value);
});

newPromise.done(function(value){
    console.log('Finished:', value);
});

d.notify(0.141592);
d.notify(0.618033);
d.resolve(27);