Closed khenry10 closed 8 years ago
Event listeners can take one of two formats:
element.addEventListener("click", function(){
alert("Hi!");
});
element.addEventListener("click", sayHi);
function sayHi(){
alert("Hi!");
}
Hint: Your answer is in the punctuation.
Doh - thanks Robin! closing this out :D
I tried to use an "addEventListener" to call a function to see if the user has found any matches, but the function only gets called when I execute in the js console. I expected 'findMatches() to execute on mouseover. Nothing happened instead. My repo link is https://github.com/khenry10/project1/tree/gh-pages and my question is about lines _32__.