Second Exercise for javascript