emmastrienko / todo-list-users

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem Statement - Users

Registration forms on landing pages are very important and should be optimized in order to encourage the users to sign up for your email list, product, subscription or service. For the todo tracker application users need to register to the application in order to use the services.

Write a program to

  • Display all the users of the todo application
  • Display a specific user from a list
  • Add a new user to the user list

Tasks

  1. Create the below functions​
  • getAllUsers() – Fetch all the users from the array. Returns a Promise​
  • createUser(user) – Add a user to the array. Returns a Promise​
  • getAUserByID(id) – Fetch a specific user based on id. If the id does not exist return a message, ‘User Not Found’. Returns a Promise​
  • displayUsers() – An async function to create a User and then get all Users​
  • displayAUser() – An async function to display a specific user based on Id​
  1. Ensure that the display happens only after a user is added to the list. A specific user can be displayed from the list of users available. ​

Instructions

  1. Download and unzip the boilerplate code.
  2. Run the command npm install to install the dependencies.
  3. Open the boilerplate code in VSCode to develop the solution.
  4. Write the code in the .js files present in src folder
  5. Run the test scripts available under src/test by giving npm run test command in the terminal to test locally.
  6. Refactor the solution to ensure all test cases are passing.
  7. Zip the solution code with the name same as assignment name.
  8. Upload the zipped solution for submission. "# todo-list-users"

About


Languages

Language:JavaScript 100.0%