JavaScript code for PE problem 186 added.