Port vs Latch

Hello everyone! It might be a pretty dumb question though but... what happens to the port value after digitalWrite function is finished? Does it still remain to 5v after execution or its value is 5v only at the function call?

What's the difference between Port and Latch or assign and set then and when to use them? Thank you so much!

Once set HIGH or LOW a digital port stays at 5V or 0V unless/until you do something to change it. You could, of course have found that out with a few lines of code.

What's the difference between Port and Latch or assign and set then and when to use them?

Well, let's see. Port is a kind of wine. Pretty good for drinking.

Latch is a mechanism for keeping a gate closed. Used whenever you have a gate that needs to be kept closed.

Assign is something put up at the end of the street, to tell you to stop.

What else was there?

Context IS important, eh?