These are chat archives for camperbot/bonfire-truncate-a-string

28th
Dec 2015
Viknesh
@vk2mars
Dec 28 2015 05:23
bf Return Largest Numbers in Arrays
CamperBot
@camperbot
Dec 28 2015 05:23

:fire:Bonfire: Return Largest Numbers in Arrays :link:

function largestOfFour(arr) {
  // You can do this!
  return arr;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

Return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.

more info:  bf details | bf links | hint

Viknesh
@vk2mars
Dec 28 2015 05:24
hint
CamperBot
@camperbot
Dec 28 2015 05:24

hint [1/7]

## :construction: After this are possible spoiler hints.

Make sure you've tried to hard to solve it yourself before proceeding. :construction:

type hint for next hint :pencil: [Contribute at the FCC Wiki]

Viknesh
@vk2mars
Dec 28 2015 05:24
hint
CamperBot
@camperbot
Dec 28 2015 05:24

hint [2/7]

# Explanation:

We need to reduce the length of the string or truncate it if it is longer than the given maximum lengths specified and add ... to the end. If it is not that long then we keep it as is.

type hint for next hint :pencil: [Contribute at the FCC Wiki]