surfmaths

surfmaths t1_j2f2asv wrote

You can create small pieces of code that we call "function". Those function take a few input that we call "arguments" or "parameters". They execute whenever they are meant to do... and usually return an output we call "result".

An example of function is "distance". It takes two coordinates as input and compute the distance between those coordinates and returns said distance.

So that does the return do in programming? It terminate the function it's in, and takes an optional argument which is the return value of the function.

7