addUser = () => {
arr.push({
login: login.value,
email: password.value,
password: email.value,
});
console.log(arr);
login.value = "";
email.value = "";
password.value = "";
};
addUser();
renger = () => {
let table = "";
table += '<table width="100%" >';
for (let i = 1; i <= 6; i++) {
table += "<tr >";
table += "<td height='30px'>" + "<hr/>" + i + "</td>";
table += "<td height='30px'>" + "<hr/>" + 'login' + "</td>";
table += "<td height='30px'>" + "<hr/>" + "email" + "</td>";
table += "<td height='30px'>" + "<hr/>" + "password" + "</td>";
table += "<td height='30px'>" + "<hr/>" + "Edit" + "</td>";
table += "<td height='30px'>" + "<hr/>" + "Delet" + "</td>";
table += "</tr>";
}
table += "</table>";
tableContainer.innerHTML = table;
};
renger();
addUser = () => {
arr.push({
login: login.value,
email: password.value,
password: email.value,
});
console.log(arr);
login.value = "";
email.value = "";
password.value = "";
};
addUser();
renger = () => {
let table = "";
table += '<table width="100%" >';
for (let i = 1; i <= arr.length; i++) {
const entry = arr[i];
table += "<tr >";
table += "<td height='30px'>" + "<hr/>" + i + "</td>";
table += "<td height='30px'>" + "<hr/>" + entry['login'] + "</td>";
table += "<td height='30px'>" + "<hr/>" + entry['email'] + "</td>";
table += "<td height='30px'>" + "<hr/>" + entry['password'] + "</td>";
table += "<td height='30px'>" + "<hr/>" + "Edit" + "</td>";
table += "<td height='30px'>" + "<hr/>" + "Delete" + "</td>";
table += "</tr>";
}
table += "</table>";
tableContainer.innerHTML = table;
};
renger();