javascript for hw2