Lab: Fun with Functions

Problem Domain

Today in lab you will fork and clone a GitHub repo, and then create solutions to some code problems such that your solutions pass the included tests.

Instructions

You are being given starter code for today, in the index.html and app.js files inside of this directory. The success of your code will be determined by whether it passes tests that are in the tests.js file. You do not need to do anything with tests.js, though you should take a look at it to see how it works.

Here are a couple of things to keep in mind:

  • Create a new branch for each code problem, and merge each branch into main on GitHub (and then pull back into main on your laptop!) when the problem is completed. Do the problems in order. Don't forget to pull the updated main branch from GitHub into your local main branch each time you merge a pull request, then make a new branch from main for the next problem.

  • Place no function calls in your code, unless inside of another function. Everything should be run by hand from the console. This is to give you additional practice using the console and practice efficient app-switching processes.

  • Although this is an individual lab assignment, do feel free to collaborate and work in pairs or groups.

Resources

This lab will have starter code provided. Work with your instructor directly to gain access to this code.

Submission Instructions

Make sure your main branch is up to date with your most recent code. Create a new pull request on GitHub from your main branch to <your school's> main branch, making sure that the left dropdown base repository says <your school name>/<your course code> and the right dropdown head repository says <your github username>/<lab name>