Uncaught TypeError: Cannot read property ‘contains’ of undefined Uncaught TypeError: Cannot set property ‘display’ of undefined I am trying to loop through todoList and get the child element. Where I am wrong? The child element is the list item. The list items are dynamically added on adding a todo. Answer Quite a bit of stuff to rewrite I added the