updated javascript

updated javascript for assignment 6