JSFiddle - React, Tailwind, and code Playground

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/bluebird/0.7.10-1/bluebird.js"></script>

JavaScript

function foo(){
    return Promise.cast("Value");    
}
function task2(e){
    alert("In two got " + e);
    return " Two ";
}
function task3(e){
    alert("In three got " + e);
    return " Three ";
}
foo().then(task2).then(task3);