the second exercise is done for javascript chapter