Bloomberg Interview Question

Javascript memories function