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

28th
Nov 2015
trypythy
@trypythy
Nov 28 2015 12:32
bonfir falsy bouncer
bonfire falsy bouncer
CamperBot
@camperbot
Nov 28 2015 12:32

:fire:Bonfire: Falsy Bouncer :link:

function bouncer(arr) {
  // Don't show a false ID to this bouncer.
  return arr;
}

bouncer([7, 'ate', '', false, 9]);

Remove all falsy values from an array.

more info:  bf details | bf links | hint

trypythy
@trypythy
Nov 28 2015 12:32
hint
CamperBot
@camperbot
Nov 28 2015 12:32

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]

trypythy
@trypythy
Nov 28 2015 12:32
hint
CamperBot
@camperbot
Nov 28 2015 12:32

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]