A client-side JavaScript excercise