Solution for Exercise 12.5

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