Comment Comment by gumoro For point 1 I would use "reduce": lines.reduce((longest, line) => (longest.length > line.length) ? longest : line, "") https://developer.mozilla.org/en/docs/Web/JavaScript/Referen...EDIT: sorry, initial code returned length, not line itself parent gumoro 10 years ago
EDIT: sorry, initial code returned length, not line itself