Do problem 6 in html/js.