Learn Create Your Own Split Screen

Next Page

Remember, there's nothing special about the use of the word "colour":
function fillCircle (x, y, radius, colour) { ctx.beginPath(); ctx.fillStyle= colour; ctx.arc(x, y, radius, 0, Math.PI * 2); ctx.fill(); } fillCircle(150, 150, 20, "red");
This would have worked just as well:
function fillCircle (x, y, radius, hue) { ctx.beginPath(); ctx.fillStyle= hue; ctx.arc(x, y, radius, 0, Math.PI * 2); ctx.fill(); } fillCircle(150, 150, 20, "red");
Or even this:
function fillCircle (x, y, radius, mood) { ctx.beginPath(); ctx.fillStyle= mood; ctx.arc(x, y, radius, 0, Math.PI * 2); ctx.fill(); } fillCircle(150, 150, 20, "red");
Just choose names that make sense to you.