Resolving the getStatus string

We're going to go ahead and knock this out, and then we'll be done. That means we'll be calling getStatus with a userId. We're going to get the status back and we are going to log the status out:

getStatus(1).then((status) => {  console.log(status);}).catch((e) => {  console.log(e);});

Now to kick things off, what do we need to do? First up, we have to go ahead and return to keep the promise chain alive, because we attach the then and catch callbacks with the getStatus function.

Next up, we'll be calling getUser. Before we can actually use getGrades, we have to take the userId, find the user object, and get their schoolId. We also want to make sure to have access to the name for the message, so we need two pieces ...

Get Advanced Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.