FAQ: Functions - Putting It All Together

Thank you for the examples, it’s helpful to see each part. I think the part about assigning the variable/parameter (same thing?) when the function is called has been the most confusing to me…I thought it was done differently/earlier…i don’t know why JavaScript has been is so difficult but thank you again.

1 Like

I’m a beginner as well but so I don’t know whether it’s correct or not but I think if you want to use jelly and pickle only , then the instead of writing

function makeSandwich(topping1, topping2, topping1, topping2, topping1, topping2, topping1)

you can write

function makeSandwitch(topping1, topping2)