Adding the removeUser, getUser, and getUserList methods

Before we can integrate users into our application, let's go ahead and finish building it out. We have three more methods to add and test. The first one is removeUser, which is going to take an argument, the ID of the user you want to remove. This is also going to return the user that was just removed, so if I remove the user with an ID of 3, I want to get rid of it from the list but I do want to return the object.

We'll leave a little note about that, return user that was removed:

removeUser (id) { 
  //return user that was removed 
} 

Now the next method that we're going to be filling out is getUser. The getUser method is going to take the exact same arguments as removeUser. We're going ...

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.