Compleated js exercise7