How do I substitute a value x (wherever it occurs in an array) with a value y???
Thanks in advance,
nyeung
Printable View
How do I substitute a value x (wherever it occurs in an array) with a value y???
Thanks in advance,
nyeung
You need to loop through the array and check each value. If the value is of x, then change that value to y.
Here is some pseudo code:
Code :
a = new array() for (each element in a) { if (element equals x) { y is assigned to element } }
Thanks! I really appreciate your help and support!
Sincerely,
nyeung