I need to add an array to the end of another array. I understand how to do this using the concat, join, and push methods. However, I need to do this using a loop (I am pretty sure a 'for' loop is the right choice), however, I can not figure out how to do this with a for loop.
arr1 = [1,2,3,4]
arr2 = [5,6,7,8]
All I need to do is add arr2 on to the end of arr1 using a loop to do this, but I have not been able to figure out how to do this. Does anyone have any suggestions or can someone please lead me in the right direction. Thanks in advance for any suggestions and/or assistance.