Object.values(zipBuckets).forEach(function(b) {
var latest = b.reports.map(function(r){return r.date;}).sort().reverse()[0];
// ...
var popup =
'<div style="font-family: Inter, sans-serif; min-width:220px; max-width:280px;">' +
(noteLines ? '<ul style="font-size:12px; color:#3a4a2a; padding-left:16px; margin:0;">' + noteLines + '</ul>' : '') +
// ...
}
Certain ergonomics are hard to miss since a human who writes heavy FP would opt for a `(r) => r.date` lambda, where the computer has no problem writing out inline `function(r)`-style declarations. Similarly, the HTML mapping function could go either way, but mixing in large sets of text with hard constants would be really uncommon for humans to write.
It's nice to have choice here when, e.g. Google, has been trending in the opposite direction.