Skip to content

Week 4 Day 4 - February 27, 2025

Control Flow 4: Additional Key Words and Error Handling

Today we did a review of the quiz for javascript. For the quiz, we revisited the lab where we added the pictures of a dog to the main image. However, we needed to use external javascript to do it. I found the quiz challenging and ended up doing it with internal javascript. One piece of information that would have been useful would have been the window.onload event.

We also reviewed different keywords for loops. These included: + break - this terminates a loop or switch + return - this ends the function execution and specifies a function to be returned to the function + continue - terminates execution of the statements in the current iteration of the current or labeled loop, and continues execution of the loop with the next iteration

The homework involved using javascript for a pancake ordering business. We used javascript to add and remove pancake and coffee orders. One part of the exercise that I found difficult was putting the number of orders into the intake form. Control flow became an issue and I also needed to prevent the automatic default for the input. I was able to complete the assignment with help from DJ.