A function is a machine. In most of your future work, you'll be working with functions you didn't write and probably won't have time to read. You'll put something in it; it will you something else back. What happens inside the machine should not be of your concern, as long as you get back what you want.
Let's pretend we have a function that does long drinks, defined as follows:
function makeLongDrink(liquour, mixer, garnish) {
var result = "here's a glass of " + liquour;
result += " and " + mixer;
result += " garnished with a slice of " + garnish;
return glass;