compleated js exercise6