Exercise Monday

Goal: Practice creating objects in JavaScript. Get comfortable with gathering input from a form and creating an object with that input, which you can then display on your website. Continue to write specifications that outline the intended behaviors for each application you write, and list them 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 first, before tackling the user interface. Additionally, make sure to include specifications with example input and output in your project's README.

To Do List

Make a to do list webpage where people can add tasks to create a list of things to do. Add an option for users to indicate a task is done. Use jQuery to remove the task from the "to do" 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 plain English specs present in the README?
  • Does the application work as expected?