3 ms·
While I think your example is fine, I think the complaint was more about very long chains. Personally, I like to break them up to give intermediate results name
by RedNifre 2y ago
While I think your example is fine, I think the complaint was more about very long chains. Personally, I like to break them up to give intermediate results names, kinda like using variable names as comments:
var longBooks = books.filter(book => book.pageCount > 1000)
var authorsOfLongBooks = longBooks.map(book => book.author).distinct()