homework#2 javascript