Your task is to create users for a user database. Each single user is an object (containing the username and their age) within the user database (which is an array). To make this task as convenient and efficient as possible for you, you will be using Class to create each object.
[ ] First step: Create a function to add a new user to the array, if both fields (name and age) are filled when the 'Add User' button is clicked. Show the array in your console after each added user.
[ ] Second step: Instead of only showing the contents of the array in the console, create a list of all users and their age in your DOM
Your task is to create users for a user database. Each single user is an object (containing the username and their age) within the user database (which is an array). To make this task as convenient and efficient as possible for you, you will be using
Class
to create each object.You can use this as the basis of your HTML: