function longest(list) {
  let index = -1
  /** @type {string} */
  let result = ''

  while (++index < list.length) {
    if (!result || list[index].length > result.length) {
      result = list[index]
    }
  }

  return result
}
@param {ReadonlyArray<string>} list
  List of strings.
@returns {string}
  Longest string.