Promisses

Run Settings
LanguageJavaScript
Language Version
Run Command
const myPromiseObj = new Promise(function (resolve, reject) { // sundae creation code setTimeout( ()=> { if(false){ // test true or false resolve('ok'); } else{ reject('ops!') } }, Math.random() * 4000) }); myPromiseObj.then(function(resp){ console.log(resp); }, function(msg){ console.log(msg); });
Editor Settings
Theme
Key bindings
Full width
Lines