added exercises

Complete through exercise 3.1 in JavaScript functions