You don’t need to include the dots in the length of the string. - but target is not used anywhere so it doesn’t matter
If str.length < num is true (first if statement) you don’t need to add dots to it: if your string is “A” and the max length is 6 it shouldn’t return A...
Also the second if statement is executed only when num === str.length because the first if statement is executed for num > str.length