Complete JS exercise