Lab 5 - Data Types & Variables

Challenge

Working with a partner from section, we are learning how to use the console from JavaScript. In particular, we are going into depth about variables, strings, numbers, and booleans.

Problems

One of the problems we found out involving the console was that console.log("") would not print out in another browser. It was puzzling for sure, but things got sorted out rather easily after doing it again on Chrome. Another problem that I personally encountered was that Professor Modes had already put a link to our JS file in the heading, so I was unsure whether to link it again in the output. I ended up just repeating the link and it worked, but I'm still not sure if that was the right decision. The final problem was when I was debugging the lab and I noticed in the console multiple messages saying "Failed to execute 'write' on 'Document." I used ChatGPT to figure out what this message meant and found that it was because this type of output command was not exactly recommended and that it required an open and close command before and after. I tried this out and it ultimately erased all formatting save for what was to be printed out by the writeln commands. I ended up leaving it as is because even though it had these strange error messages, the output seemed to display properly in its correct position and there were no blatant modifications to the CSS.

Results

Here, you can see the car I picked for the assignment. I'm too poor to actually have it but I liked the color. I also messed around with the CSS stylesheet to make it so that the image really popped by adding a shadow to it.

Script Output