J.P. Morgan interview question

Javascript design patterns