Convert the following following code to use the addEventListener
method:
const btn = document.querySelector(".btn");
btn.onclick = function () {
console.log("I'm a button");
};
Add a click event using addEventListener
to the second button.
In the event's function, display the character count from the input in the b.count
element.
Make sure to remove all trailing and leading spaces (spaces at the beginning and end of the input's value).