Javascript Assignment updated

Not fully functional.