Creating Promises in ES6

creating promises and resolving/rejecting them using the 'resolve' and 'reject' keywords

Consider the following code:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.