I tried testing the example given in MDN in one of the promise implementation. Its giving me the error as below.
Error
Uncaught TypeError: doSomething(...).then is not a function
at promise.js:16
JS file
function successCallback(result) {
console.log("Success" + result);
}
function failCallback(fail) {
console.log('fail' + fail);
}
function doSomething(successCallback, failCallback) {
return "Yello";
};
doSomething(successCallback, failCallback);
doSomething().then(successCallback,failCallback);