Today in Class: 10-29-18

Learn JavaScript Looping and Branching.

by Charlie Calvert

The goal of this assignment is to learn about JavaScript variables, operators, branching and looping. Use our branching document as a reference.

As we discuss various issues today in class, we will be creating files called week07-day01.js and week07-day01.html. These files should be placed in the javascript-tests directory of your repository and pushed to GitHub. Link to the JavaScript file from the HTML file and link to the HTML file from your home page.

NOTE: You probably already have a directory called JavaScriptTest or JavaScriptTests. I want us to switch to having directories and files composed solely of lower case letters. To rename JavaScriptTest to javascript-tests do this:

    git mv JavaScriptTest javascript-tests

The contents of the file will evolve during class as we experiement with variables, operaters, branching and looping. We will mostly be running the JavaScript file from the command line. We should however, run the HTML file on our GitHub pages and check the output it produces in the console window of the Developer Tools. There might not be any output at first, but some should begin to appear over the course of our class time.

When grading this assignment, I will check for the existence of this file and any related files, such as a CSS file, if we create or use one. I'm not looking for specific content in this file, nor am I particularly interested in checking the file for correctness. I just want to see that the file exists, and that it contains content at least reasonably in accord with what we are doing in class.

I will also be looking at the history of your repository. In particular, I will run the command git log. This will show me how many times you pushed to GitHub this week. I'm expecting to see that you pushed several times today, and hopefully also that you will have pushed several more times throughout the week. Regardless, I expect to see that you pushed to GitHub at least 5 times this week.

This assignment has three goals:

A somewhat unintended consequence is that this is also a means of my taking role. If you missed class for some reason, please explain why when you submit the assignment. As explained elsewhere, I will almost always "forgive" a student for missing one class per quarter, which means -- I suppose -- showing mercy when grading this assignment if you missed class. But if you miss multiple classes, I will be looking for a good explanation before letting up on the grading of this assignment.