On this challenge, there is some wording that I don’t quite understand based on one of the expected results. Part 1 of the challenge is clear. no confusion on this part.
Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a … ending.
Note that inserting the three dots to the end will add to the string length
Part 2 of the challenge is this:
However, if the given maximum string length num is less than or equal to 3, then the addition of the three dots does not add to the string length in determining the truncated string.
But look at this expected result.
truncateString(“A-”, 1) should return “A…”.
Does this result fall into part 2 of the challenge definition? If it does, why are we
adding to the string length?
Sorry, I am just confused by the challenge description and looking at the expected outcomes.