Review a JavaScript flatten PR | Elastic Interview Question