Appuyez sur Entrée Reaction JS

window.addEventListener('keypress', (e) => {
        if (e.key !== "Enter") return
        addTask()
    })
Disgusted Dunlin