Spring 2017 – Week 2 Class Notes

Another week is in the bag! It was good to see you all, and I’m glad to see you all keeping up with your work.

Computer Programming

This week we reviewed objects (and a little arrays) and then talked about the built-in objects in JavaScript for interfacing with web pages. The main object used is “document”, and the main function that bridges the gap between JavaScript and HTML is “getElementById”. A lot of you kept thinking that the “innerHTML” function plays a role, probably because of the word “HTML” in the function name. “innerHTML” is actually rarely used. getElementById takes a string, and finds and returns an HTML element having that string as an ID. It doesn’t matter what your variable is called, it only matters that the string you pass to getElementById matches the string you put in the id=”” attribute of your HTML element.

Another thing I noticed is that I think there was some confusion on the “return” statement. When a “return” happens – that’s the end of the function! Nothing else occurs after the “return” statement. We often put it at the end of our function (and there is usually one there), but technically you can return from anywhere in your function. There can even be multiple returns, based on conditions. But as soon as the return runs, the function is over.

This week we are working on chapter 15. Don’t forget to email if you run into trouble!

Electronics

This week we reviewed diode action and practiced our measurement skills with our multimeter. Every did well. This week review chapter 8 and do the problems at the end. Next week we will focus on power.

Calculus

Read chapters 18 and 19. I don’t have problems for that yet, but I might get some done over the weekend so check back Monday.

Comments are closed.