It started with an assignment, and I just had a moment to hack out what it was I was discovering during spring break last week.
Another thing I learned:
Double quotes can bite you. When using a button to perform an action, I was having difficulty passing a parameter to a function. The reason why is because I had to pass the parameter using double quotes (it was a string id of a page element). I discovered that when you create a button, it's best to pass the action of the button in double-quotes. I then had to pass the parameter in single-quotes The code looked something like this:
getComp is a function I wrote to display the attributes of objects, hal2000 is the object whose attributes I will display, and conComp is the id of a p tag in the HTML of the page. I use it to display the object's attributes.
I'm more than halfway done with the school year and I'm learning a lot!