Finished functional javascript exercises 5-6