I'm trying to run my code for my To do list project but keep getting the error (cannot read appendChild).
let addToDoButton = document.getElementById('addToDo');
let toDoContianer = document.getElementById('toDoContianer');
let inputField = document.getElementById('inputField');
addToDoButton.addEventListener('click', function() {
var paragraph = document.createElement('p');
paragraph.classList.add('paragraph-styling');
paragraph.innerText = inputField.value;
toDoContianer.appendChild(paragraph);
inputField.value = "";
paragraph.addEventListener('click', function() {
paragraph.style.textDecoration = 'line-through';
});
paragraph.addEventListener('dblClick', function() {
toDoContianer.removeChild(paragraph);
});
});