- Background image from wikimedia
Overall, I would say this went pretty smoothly. I used a different method to initialize the javascript, which caused some initial troubles but ended up helping me be more aware of putting everything in functions instead of just having free-floating code.
When I was working with my result alert, I wanted to give the same message for two different scores. I tried to do case(2||3)
, but that didn't work. I ended up using
case (3):
case (4):
alert(`Not bad, ${userName}. You got ${quizScore} correct.`);
break;
Is there a cleaner way to do that with the case function?
I estimated I would take about 1.5 hours to finish the lab, and I ended up taking about 3 hours. Still, the javascript portion that was the main focus of the lab only took about an hour; I spent way too much time trying to decide what content to write and more more time than expected trying new things in css.
I am quite happy with how this went. The two new questions were pretty easy, nut moving the earlier questions to an array proved to be a fun new challenge. I found it pretty annoying that js can sometimes interpret a boolean as an integer, but other times it cannot.
I estimated 3 or 4 hours initially and it took about 5 hours. I ended up spending more time in class discussion than I expected, but was still on the top end or over what I predicted.
Driver: Josh Boyles
Navigator: Daniel Frey