goncalossilva
for (let i = 1; i <= string.length && i < MAX_LENGTH; i++) { string = string.slice(0, i) }