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

20th
Sep 2015
Joy Antony
@joyantony
Sep 20 2015 05:50
hint
CamperBot
@camperbot
Sep 20 2015 05:50

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]

Joy Antony
@joyantony
Sep 20 2015 06:50
hint
CamperBot
@camperbot
Sep 20 2015 06:50

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]

Joy Antony
@joyantony
Sep 20 2015 06:52
hint
CamperBot
@camperbot
Sep 20 2015 06:52

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]

Joy Antony
@joyantony
Sep 20 2015 06:53
hint
CamperBot
@camperbot
Sep 20 2015 06:53

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]

Joy Antony
@joyantony
Sep 20 2015 06:54
hint
CamperBot
@camperbot
Sep 20 2015 06:54

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]

Joy Antony
@joyantony
Sep 20 2015 06:54
hint
CamperBot
@camperbot
Sep 20 2015 06:54

hint [6/7]

Spoiler Alert!

687474703a2f2f7777772e796f75726472756d2e636f6d2f796f75726472756d2f696d616765732f323030372f31302f31302f7265645f7761726e696e675f7369676e5f322e676966.gif

Solution ahead!

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