let inputValu = document.querySelector('input');
let btn = document.getElementsByTagName('button');
let ulList = document.getElementById('myUl');
let doneList = document.getElementById('done')
btn[0].onclick = function () {
let createLi = document.createElement('li')
createLi.innerHTML = inputValu.value;
ulList.appendChild(createLi);
createLi.onclick = function () {
createLi.style.textDecoration = 'line-through';
doneList.appendChild(createLi)
}
doneList.ondblclick = function () {
doneList.removeChild(createLi);
}
}
createLi.onclick
дописываете createLi.onclick = null;
doneList.ondblclick = function () {
doneList.removeChild(createLi);
}
меняете на createLi.ondblclick = function () {
createLi.remove();
}
.onclick
и прочее надо менять на .addEventListener
.