Problem with a challenge

I am going through Basic Algorithm Scripting and after days failing to meet the requirements to pass
this task I was forced to look for a hint and none of the given solutions are working. Then I realised that they do, but the conditions are impossible to meet.

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/truncate-a-string

No they are not impossibe to meet but, if they are to difficult for you reconsider giving yourself a chance to go over the challenges once more/find and alternative source that can help you understand better :3 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice for a start :3

1 Like

I believe that the solution that is currently included in the hints are out of date. This challenge used to be more complicated, and that solution is designed to meet those requirements.