Module 3: Introduction to JavaScript and Web Design

Here’s the link to my updated site: http://drew-williams.infinityfree.me/Module3.html

For this assignment, I started by testing the sample JavaScript code. The code worked as expected, it created three variables (price1, price2, and total), added the first two numbers together, and displayed the result in the webpage. The object in this example is the document, and the variables are price1, price2, and total. Seeing the output appear on the page helped reinforce how JavaScript connects with HTML elements.

I also read Chapters 2–4 of Eloquent JavaScript. These chapters went into more detail on program structure, functions, and how code flows in JavaScript. It was useful to see the fundamentals broken down step by step.

The last part of the assignment involved creating an image in three formats: PNG, JPG, and GIF. I exported my test image (which is just a personal icon I developed for my professional portfolio) in all three and added them to my Module 3 page. After comparing them, here’s what I noticed:

  • PNG had the best overall quality and supported transparency.

  • JPG loaded quickly and had the smallest file size, but the quality wasn’t as sharp.

  • GIF worked fine, but the quality was limited compared to PNG and JPG, it seems to be slightly dimmer/lower contrast than the others.

Overall, PNG worked best for clarity and transparency, while JPG was best for speed. GIF felt more outdated and less useful for this type of image.

This assignment helped refresh me on some JavaScript basics while also helping me understand the trade-offs between different image formats in web design.

Comments

Popular posts from this blog

Module 8: PHP Forms and GET vs POST

Module 2: Introduction to HTML, CSS, and FTP

Working with Datetime and Timedelta in Python