For the lecture will be talking about the document object model (DOM), and looking deeper at object oriented programming (OOP) and how to use JavaScript to interact with the DOM tree. We will also be covering events that can trigger code, i.e. on click, on load, on keypress, etc. We will look at some sample javascript-based games, as we begin to explore our mid term work.
Create an object constructor, for student date. Define your own name + value pairs (properties), and include one method (a function inside an object). Then using oyur new object constructor, create a new object. Iterate through that object in the console using the "for" function.
For our midterm we will be programming a simple game or interactive visual art piece. Your midterm assignment should:
Here is the code from this week's lecture (I have heavily commented the code to further illustrate the concepts and ideas discussed):
Here are some tutorials and resources for Canvas:
And here are some of the events/tech spaces I mentioned this week: