Skip to content

Latest commit

 

History

History

README.md

Workshop 2

By the end of these exercises you should be able to understand the following concepts:

  1. Declaring new functions and the concept of functions in general
  2. Responding to user input from the DOM
  3. Modifing the DOM

Exercises

Start here if the material in the lecture was confusing or you want to brushup on your skills.

  1. Form validation is one of the first uses and bread and butter of javascript. Create a login form with password fields to:
    1. Validate that every field is filled out.
    2. Compare password and password confirmation.
    3. Validate the password is at least 8 characters.
    4. Tell the user when there is a problem with the form.
    5. Tell the user when they've successfully signed up.

(Note, most of this can be done with HTML 5 now, don't use this yet as it would circumvent the need to use javascript at all, and that's the point silly.)

  1. Kitchen sink, demonstrate your html selection skills and go through the following exercises:

    1. Push the button and alert the user of the value they entered
    2. Add the numbers from the two boxes together, then alert the user of the value.
    3. Update the text block with the selected value from the drop-down.
  2. Create a basic two-input calculator with the following functions:

    1. Addition
    2. Subtraction
    3. Multiplication
    4. Division
    5. Reset
    6. Clear last input