FAQ: Functions - Putting It All Together

Hi, rryannn,
I think your question is about the same as mine. I pasted the answer I got :slight_smile:

" in the original definition, how does the computer recognise the values of topping1 and topping2 as ‘burger patty’ and ‘pickles’ ? Why not anything else ?"

Answer: for any given function(parameter), the parameter is something that can be input by the user or by another action (like a function that has the role to change that parameter). The computer only recognizes these particular parameters as strings.

So for this example, it a further version of the program it would be possible for there to be 2 other functions getTopping1(topping) and getTopping2(topping) that pick out the variable topping from a list of of toppings.

In this immediate program, the final result is that the variable result has been given a value of the function makeSandwich(). It is a result that can be unique for every customer order (in a bigger theoretical implementation).