Closed codingbootcampseu closed 3 years ago
form
click
Hints
Find elements within the document.
const button = document.querySelector('button');
Attach event listener to element.
const button = document.querySelector('button'); button.addEventListener('click', function() { alert("yeah!"); });
Example Solution and Comparison
Version 0.1 is done
form
with one text input and a button with the text "Add Todo"click
event to your button that reads the current value of text input and logs it to the consoleHints
Find elements within the document.
Attach event listener to element.
Example Solution and Comparison