Today, I did continue how to delete and refresh the buttons on the page. I tried to add an event listener but it did not work as I expected. I did manage to add functions that allow me to add input and a line through.
I am still looking for a new way to add an event listener so that it can work properly. Otherwise, the key is to keep practice.
As you can see it down below my code:
var clear = document.getElementById("clear");
var date = document.getElementById("date");
var list = document.getElementById("list");
var input = document.getElementById("input");
var liste = [], id = 0;
var check = "far fa-check-circle";
var unCheck = "far fa-circle";
var line_Through = "lineThrough";
var options = {weekday: "long", month:"short",day:"numeric"}
var today= new Date();
date.innerHTML = today.toLocaleDateString("de-CH",options);
function addToDo(toDo, id, done, trash){
if(trash){return;}
var Done = done ? check : unCheck;
var Line = done ? line_Through : "";
list.insertAdjacentHTML("beforeend", `<li class="item">
<i id="circle" class="far ${Done}" job="complete"></i>
<p class="text ${Line}">${toDo}</p>
<i id="delete" class="fas fa-trash-alt" job="delete"></i>
</li> <hr>`);
}
addToDo("Tennis",1,true,false);
addToDo("Shopping", 1, false,false);
My App:

My English lesson still goes on on Udemy same as my typing lessons.
Jean Cédric NTWARI