Exercise Sunday

Goal: Practice creating objects in JavaScript and building out business logic with specs. Your specs should outline the intended behaviors for each application you write and should be included in your project's README.

Warm Up

  • What is the difference between creating an object using literal notation, and creating an object using a constructor?
  • What benefits do constructors offer?
  • What is a prototype? How does it differ from a constructor?


Address Book

Follow along with this weekend's homework to create an address book application using constructors and prototypes.

Places You've Been

Create a website where you can keep track of all the places you've been. Each destination should be an object with multiple properties, like location, landmarks, time of year, notes, etc. Display those properties when a user clicks on a place's name. Complete the business logic for your place object (including specs, which should go in your README). If you complete the business logic, you may work on adding a user interface. (See tonight's lessons for more.)

To Do List

Make a to do list page where people can add tasks to create a list of things to do.

  • Add an option for users to indicate a task is done.
  • Allow users to remove a task from the list.

  • Make sure to identify specific behaviors your program should demonstrate and create specifications with example input and output. List these in the project's README.

Peer Code Review

  • Do JavaScript objects drive application logic?
  • Are constructors and prototypes used successfully?
  • Are pseudo-coded tests present in the README?
  • Does the application work as expected?

Lesson 14 of 23
Last updated October 12, 2021