JRJon Randy@jonrandy·5d0e8b80fPop quiz. Give me your shortest JS to get the last non-empty element from an array1Quote
RGRamon Gebben@RamonGebben·5d599e198I would likely go with: a.findLast(x=>[x]+'') https://jsbm.dev/4t3pLwuhzQumsjsbm.devJS BenchmarkA straightforward online JavaScript benchmarking tool and REPL with support for ES modules and libraries.Quote
JRJon Randy@jonrandy·5dc59d604That's closer, but doesn't give the right result in some cases12:31 · Nov 13, 2026 · commit c59d604QuoteReply