Allstate interview question

JS basics, Closures, ES6, Design & coding principles