I can't understand how to make an object which will be make from user input and then added to array of objects
Here is what i tired:
let Contact = {
fristname: "fname",
lastname: "lname",
}
const Contacts = []
function addContact(fristname, lastname){
let imie = window.prompt("give fristname\n")
let nazwisko = window.prompt("give lastname\n")
let userObject = {};
let userInput = prompt("Please enter some data");
userObject.data = userInput;
}
I hope this might help you.