i was wondering what happens to the old code that was originally uploaded to my arduino, if i upload a new code ?
on the Arduino side, it is overwritten. think a chalkboard. never available on the Arduino side again.
on your programming side, whatever you saved last is what you can upload.
you loose any changes as you go.
if you want to archive, I wil often have two copies. one that has 'working' at the end of the filename.