JSFiddle - React, Tailwind, and code Playground

by neerajdotname

JavaScript

$.doit = function() {
    var dfd = $.Deferred();

    //dfd.reject();
    
    return dfd;
}

$.doit().then(
               function() { $('body').append('<p>Success</p>') },
               function() { $('body').append('<p>Failure</p>') }
);