Your second for loop


#1

my code

Tel me what's up to this error and how to fix it


#2

Hi @ps567,

Why do you have the if-block on line 6? Don't you think it will always be false because text.length is always greater than myName.length? :wink: Since it is always false, your second for loop never executes, and hence you get the error.