Exercises in javascript