finished exercise 18 javascript