Alexandria Lalli
2 min readDec 7, 2023

I learned something today about javascript that I think is super cool and I wanted to share it.

I was mid-code-review at my job, when I saw a file that had a huge function. At the very end of it, there was a conditional return.
Something about this conditional return stood out to me. It wasn’t that it was conditional, but it was because of what it returned. Let me set the scene for you…..

const superCoolFunction = ({ itemOne, itemTwo…
Alexandria Lalli

Full-Stack Engineer, UX/UI Aficionado, and lover of coffee.