ahandrewh teaches IAT-339web design & development

JavaScript exercise (due October 24)

This document is a draft

Until October 17As a result it may still change up until October 17.

Introduction

To practice understanding JavaScript (JS) you will be adding comments to an existing JavaScript file to explain what the file does. You are expected to make use of online resources to help you understand the JS.

Instructions

For this exercise you will be starting with a pre-built set of HTML, CSS, and JS files. Please download the starter files.

What does the JS do?

To get started, open up the index.html file from the starter files to see what the JS does on the page. Explore what JS has added to the page by disabling JavaScript and seeing what no longer works.

Make sure to re-enable JavaScript and to keep the developer tools console open and available for this exercise.

Understanding the JS

Open up the toggle_image_size.js file from the starter files (it will be in the js folder). Within the file please read the code line by line and complete the following:

  1. Provide an explanation of what each line of the JS does as a comment within the code.
  2. Use online resources or peers to develop your explanation, but explanations must be in your own words.
  3. Make sure to include links or citations for any resources used to assemble your explanation.

You may add console messages as needed to the JS file to help your understanding of it. We highly recommend searching the Mozilla Developer Network's resources on JavaScript as a starting point for helping your understanding.

Once done explaining the JS

Submit the JS file with your embedded explanation to the Canvas assignment.

Your submission is due before 8:30am on October 24.

Grading rubric

This code exercise is worth 1% (1 point) of your final grade.

Exercise rules reminder

Please remember that the exercise rules still apply:

  1. You can use online resources, course materials, your TA, and lab-mates for support. This being said, others are not allowed to do your work for you. Also, if you are drawing from online resources, course materials, your TA or peers, you must;
  2. Cite any knowledge that is not yours in a comment in the code. The internet is a huge repository of information and you are welcome to use it, but you must let us know when something does not originate from your own knowledge.
  3. If work has been copied without citation the exercise grade will be zero. Please make sure to include comments indicating where you had assistance or learned.