Step 2

Creating Functions


Next we are going to create a function.

In programming, functions are a group of code that have been put together to complete a specific task.

We are creating our own function called ‘createFood’, this will help us generate food on the screen.