JRJon Randy@jonrandy·5d0e8b80fPop quiz. Give me your shortest JS to get the last non-empty element from an array1Quote
JRJon Randy@jonrandy·5dad21168Simply that - empty08:10 · Nov 13, 2026 · commit ad21168QuoteReplyHide repliesJJPetsis@JPetsis·5djsarr.findLast(v => v != null && v !== '' && (typeof v !== 'object' || Object.keys(v).length))Reply1 reply
JJPetsis@JPetsis·5djsarr.findLast(v => v != null && v !== '' && (typeof v !== 'object' || Object.keys(v).length))Reply1 reply