I have a javascript array with x amount of values.
How can I replace the last element in that array with the first? (Not switch positions but remove the last array and put the first in the last position)
Example:
Initial Array: [9, 14, 23 ,12 ,1]
Final Array: [9, 14, 23, 12, 9]
You don’t need to know very much. For starters see JavaScript Array Object.