I am a beginner with arrays, so I apologize if the answer of my question seems obvious. But I did not find the answer in the tutorials I have read.
I have a one-dimension array, it may look like this
0 : "boat"
5 : "infantry"
First, I want to check automatically if there is any 0 in my array (there is in my example, but it might not...).
Then, the FIRST time a 0 is found, I want to replace it by "submarine". But only for the first 0 found. The second 0 in this example would not be changed.
How would you do that ?
Thanks a lot