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.

Journal Discussion


This Week's Prompt

You were asked to write responses to the following in your journal over the weekend, as detailed in the Week Four Journal Prompt exercise:

  • When, like all developers, you encounter a problem you can't immediately solve, what's your internal reaction? Is it along the lines of "Oh, I'm not smart enough for this.", more like "Okay, I just need to learn more.", or something else?

  • Be honest, what do you value and praise yourself for more? Innately/already knowing how to solve a problem? Or being able to stick with it, research, troubleshoot, and learn more to debug?

  • Based on your answers to questions above, do you think you have a growth mindset? Why or why not?

  • If you don't currently have a growth mindset, identify what you could do differently to begin fostering one. Or, if you already think you do, what could you to do maximize it?

Discussion Questions

Before beginning programming work, discuss what you recorded in your journal with your partner using the following questions as a guide:

  • Did you determine whether you each had a growth mindset? Why or why not?

  • How do you think having a growth mindset leads to increased success, especially in a notoriously-tricky field like programming?

  • What did you identify as ways to foster or increase your own growth mindset? Share ideas, and determine how you'll keep each other accountable to your plans while programming together today.

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?

Code


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 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.

  • Use jQuery to remove the 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 plain English specs present in the README?
  • Does the application work as expected?