Learn Create Your Own Split Screen

Next Page

When you make a function, there's a couple of ingredients to the recipe:
function fillCircle (x, y, radius) { ctx.beginPath(); ctx.arc(x, y, radius, 0, Math.PI * 2); ctx.fill(); }
You can think of a function as a "program within a program".

It's important to understand the code inside the function doesn't actually run until you call the function.

fillCircle(150, 150, 20);