import projects from "../projects"; let idValue = { value: 0, get val() { return this.value; }, set val(value) { this.value = value; } } export default function refreshDOM() { const projectsDiv = document.querySelector("#projects-div #list"); const tasksDiv = document.querySelector("#tasks-div #list"); [projectsDiv, tasksDiv].forEach(div => { while (div.lastChild) { div.lastChild.remove(); } }) projectsDiv.innerHTML += ` name: ${projects[0].name},
`; idValue.val = 0; projects[0].todos.forEach(task => { tasksDiv.append(task.element); }); } export { idValue };