Domanda di colloquio di Sense

Q: Give me a function that behaves like 'flat' function in JavaScript.