It's good to be able to use someting, it's better to understand how it works.
www.goanation.net
All things are lawful, but not all things are profitable.
Daniel Demesmaecker wrote:cause you're searching for the city in an empty array of cities
All things are lawful, but not all things are profitable.
Daniel Demesmaecker wrote:cause you're searching for the city in an empty array of cities.
You don't initialize the values of the array.
Note, this is the 4th or 5th question you ask about the same subject, but after getting some response you never let us know if you got it working, a little feedback or thanks on the responses you get would be nice...

It's good to be able to use someting, it's better to understand how it works.
www.goanation.net
Knute Snortum wrote:Take a look at this:
Go through it step by step. Keep in mind what tempName will be. What happens if cityName isn't the last element in your array?
It's good to be able to use someting, it's better to understand how it works.
www.goanation.net
Daniel Demesmaecker wrote:No you don't, the class you thin you initialize is test and the class that returns the array is tester, even if you would Knute is still right...
You have to break out of the loop once you found the right value...
All things are lawful, but not all things are profitable.
can you show me the way i will get the output of the "cityName" and not the output saying "There was no match inside the citise array to the name "+cityName;"
i'm so lost
It's good to be able to use someting, it's better to understand how it works.
www.goanation.net
rian bron wrote:can you show me the way i will get the output of the "cityName" and not the output saying "There was no match inside the citise array to the name "+cityName;"
i'm so lost
All things are lawful, but not all things are profitable.
Knute Snortum wrote:
rian bron wrote:can you show me the way i will get the output of the "cityName" and not the output saying "There was no match inside the citise array to the name "+cityName;"
i'm so lost
Well, I'm not sure why you would need the variable test at all. Why not use cities?
Daniel Demesmaecker wrote:If I was you I would have a look at some tutorials on how to write clean code, it would greatly aprove the readabillity of your code and not only help others that trying to help you understand your code better, but also yourself when you getting back to it after a long time.
can you show me the way i will get the output of the "cityName" and not the output saying "There was no match inside the citise array to the name "+cityName;"
i'm so lost
simply at break; to your if statement
All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
Knute Snortum wrote:Look at this closely:
What are you comparing? A City or a cityName?
It's good to be able to use someting, it's better to understand how it works.
www.goanation.net
rian bron wrote:i want to compare the cityName , thats why i need to wriite
All things are lawful, but not all things are profitable.
