JavaScript code for PE problem 219 added.