rejectbeginnerPromise.reject(new Error('failed'))
.catch(err => {
console.log(err.message) // β 'failed'
})Promise.reject() creates an already-rejected promise with the given reason.
Both Promise.reject and Promise.resolve are functions.
Challenge: Verify both have the same typeof.