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

1st
Jan 2016
nellie-c
@nellie-c
Jan 01 2016 19:31
hint
CamperBot
@camperbot
Jan 01 2016 19:31

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]

nellie-c
@nellie-c
Jan 01 2016 19:31
This message was deleted
hint
CamperBot
@camperbot
Jan 01 2016 19:31

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]

nellie-c
@nellie-c
Jan 01 2016 19:32
hint
CamperBot
@camperbot
Jan 01 2016 19:32

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]