Module 4 Assignment

Module 4 Assignment


1. JavaScript If Else Condition

For this assignment, I created my own customized if-else condition using JavaScript. The goal was to display a message based on how many hours someone studied.



This script checks the value of studyHours and displays a different message depending on whether the condition is true or false. I chose this example because it felt relatable and easy to understand, and it helped me see how if-else statements can be used to make decisions in a program.

My First Website 

Reflection:

Creating the if-else condition was easier than I expected once I understood the logic behind it. The easiest part was deciding what condition to check and writing the messages that would display on the page. The harder part was making sure the syntax was correct, especially remembering where the curly braces go and how the if-else structure is supposed to be written.


2. The original code had an issue with the if-else statement structure. The problem was that the brackets were not placed correctly, which caused the script to break.

Here is the corrected version of the code:

After fixing the brackets, the code worked properly and displayed a greeting based on the current time of day.

3. For the web design part of this assignment, I downloaded an image from the web and opened it in Adobe Photoshop. I used the Save for Web feature to prepare the image for online use by following the steps shown in the lecture video and the USF tutorials.This process helped me better understand how image quality and file size affect how a website performs. The easiest part was exporting the image once I found the right menu options. The hardest part was figuring out how to keep the image looking good while also making sure the file size wasn’t too large. Overall, this experience made me feel more comfortable using Photoshop for web design and showed me why image optimization is important for websites.


Comments

Popular posts from this blog

My Website Wireframe & Design Process

Module #9 Assignment