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

13th
Dec 2015
Brett Groff
@groffTECH
Dec 13 2015 21:42
bf hint
CamperBot
@camperbot
Dec 13 2015 21:42

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]

Brett Groff
@groffTECH
Dec 13 2015 21:48
hint
CamperBot
@camperbot
Dec 13 2015 21:48

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]

Brett Groff
@groffTECH
Dec 13 2015 21:48
Hint
CamperBot
@camperbot
Dec 13 2015 21:48

hint [3/7]

Hint: 1

Strings are immutable in JavaScript so we will need a new variable to store the truncated string.

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

Brett Groff
@groffTECH
Dec 13 2015 21:49
hint
CamperBot
@camperbot
Dec 13 2015 21:49

hint [4/7]

Hint: 2

You will need to use slice and specify where to start and where to stop.

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

Brett Groff
@groffTECH
Dec 13 2015 21:49
hint
CamperBot
@camperbot
Dec 13 2015 21:49

hint [5/7]

Hint: 3

Do not forget that when we truncate the word, we also must count the length added by ...

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

Brett Groff
@groffTECH
Dec 13 2015 22:31
hint
CamperBot
@camperbot
Dec 13 2015 22:31

hint [6/7]

Spoiler Alert!

687474703a2f2f7777772e796f75726472756d2e636f6d2f796f75726472756d2f696d616765732f323030372f31302f31302f7265645f7761726e696e675f7369676e5f322e676966.gif

Solution ahead!

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