From Node Lecture Asynchronous JavaScript : 8- Consuming Promises
Hello Forum,
I’m confused why the third then( ) always return undefined.
getUser(1)
.then(user => getRepositories(user.gitHubUsername))
.then(repository => getCommits(repository[0]))
.then(com => console.log('Commit', com)) // this always return 'undefined'
.catch(error => console.log('Error', error.message ));
Thanks,
Fmarsella
Following are the rest of my codes: