Solution for Exercise 12.3

This is a solution for Exercise 12.3. See the source code of file app.js.