JSFiddle - React, Tailwind, and code Playground

JavaScript

const promise = new Promise(function executor(resolve, reject) {
	setTimeout(function () {
  	           resolve(42, true);
            }, 1000);
  });
promise.then(function resolveCallback(answer, howCertain) {
	console.log('callback called with arguments: ('+answer+', '+howCertain+')');
  console.log('the answer is: '+answer+'. I am '+(howCertain?'very':'not very')+' certain about that');
});