Separation from Markup

In an earlier example, we used the "onclick" attribute to specify a javascript function to call:
hide-show.html | Hide/Show as JSFiddle

javascript onclick


In JavaScript, we saw the "addEventListener" method to add event listeners using JavaScript!