Adding the value at the end of the array within the loop I have tried appending the value at the end of the array.