JavaScript code for PE problem 479 added.