I'm a beginner myself, but I'd say the logic of functions is that only the reuseable code is within curly brackets. The brackets are for the directions, and the foodDemand is the button that executes it.