hw javascript to exercise 3 done