Off Topic:

Originally Posted by
sdleihssirhc
- Don't use HTML's "onclick". Again, there are various reasons for this, but it's mostly because it is ugly and an affront unto the Front End Lord. The problem is that events are really complicated in JavaScript. For simplicity, simply use an event handler:
Not sure what you're on about here.
In this case the event handler is the popup() function which is called when an onclick event is triggered.
The only question then is whether the event handler should be assigned directly in the html or separately in the javascript. Yes, inline javascript is generally frowned upon nowadays, but since the op is learning the basics there is nothing wrong with assigning the onclick in the html, especially if you want to KISS
Bookmarks