Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Let's do some practice with a simple exercice. You must modify the code below based on the following rules:
- The function
job
must return a promise object (you are in a NodeJS environment, you can usenew Promise
) - The promise must resolve itself 2 seconds after the call to
job
and must providehello world
in the data
Change the code to return a promise
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content
1
2
3
4
5
function job() {
return 'hello world';
}
module.exports = job;
Enter to Rename, Shift+Enter to Preview