Some code to practice javascript