function fail() {
    return new Promise(function(resolve, reject) {
        reject(new Error("oops"))
    });
}
// it's not marked as async, just returning a promise
it's not marked as async, just returning a promise
it ' s not marked as async just returning a promise
function fail() {
    return new Promise(function(resolve, reject) {
        reject(new Error("oops"))
    });
}
function fail ( ) { return new Promise ( function ( resolve , reject ) { reject ( new Error ( "oops" ) ) } ) ; }
it's not marked as async, just returning a promise
it ' s not marked as async just returning a promise