JSFiddle - React, Tailwind, and code Playground

by josh3736

HTML

<div></div>

JavaScript

$.whenall = function(arr) {
    return $.when.apply($, arr).pipe(function() {
        return Array.prototype.slice.call(arguments);
    });
};

var a = $.Deferred(), b = $.Deferred();

$.whenall([a,b]).done(function(arr) {
   $('div').text(arr.join(','));
});

a.resolve('a');
b.resolve('b');