Folloze Interview Question

Home exercise in JavaScript though the emphasis is on good software design