JSFiddle - React, Tailwind, and code Playground

by Sir_Pepe

HTML

<script src="https://rawgit.com/kriskowal/q/v1/q.js"></script>

JavaScript

var promise = $.get('/').promise();

promise.then(function(){
  console.log(arguments);
  // > [ 'Result', 'success', xhr ] - Drei Werte? Ok...
});

$.when(promise).then(function(){
    console.log(arguments);
  // > [ 'Result', 'success', xhr ] - Kennen wir ja...
});

$.when(promise, promise).then(function(){
  console.log(arguments);
  /* >
     [
       [ 'Result', 'success', xhr ]
       [ 'Result', 'success', xhr ]
     ] ... WTF!
  */
});