Functions
A function packages up logic you want to reuse instead of repeating it every
time you need it. It takes input through parameters, does something with them,
and hands back a result with return - the function stops running the moment
it hits return.
Without return, a function just runs and gives back undefined, which is a
common bug: the logic looks right, but nothing ever comes out the other end.
Every function you write in this module should end with an explicit return
unless it genuinely has nothing to hand back.
Your task: write a function called sum that takes two numbers and returns
their sum.
You'll practice:
- Declaring a function with parameters
- Returning a value with
return