How i can do that whats wrong?


whats wrong


There is a problem here:

Can you spot it now?


what i need to do? delete that?


That is a bit drastic. If you deleted it, what would you put in its place? What purpose does it have -- can you put that into words?




I'm trying to help you understand what you are doing. When you write programs you will spend more time debugging than writing so you might as well start picking up a few skills in that area.

You don't seem to understand why you've written

i < name.length

In a for loop you have these sections:

for (where to start; when to stop; change the counter)

You've said that you want to stop looping when:

i < name.length

Tell me what does name.length mean?


It shows how much letters are in the word


@lucbat1, theres no need to delete that specific part of your program. @albionsrefuge is trying to say that you need to analyze and understand what you had written or what your are doing.

For clarification, where did you get your variable name in name.length ?
As you can see, your variable holding your array is names.

See the difference? The variable names that you declared above holding your array is the one you will use in your for loop when to stop section.

Hope this helps.


thank you I typed too fast


Thank you for helpe me to understand, i alread understand it, but here is just a type error


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.