week 3, javascript problem set 3