replaceAll function, I need to modify anArray so that all element in the array that have the value of oldVal get replaced with the value of newVal.
Example code