Lesson 18 · A function with an argument

Programming basics · 3 min · See the playlist on YouTube ↗

✓ You already watched this lesson

A function is the recipe, and the argument is the ingredient you change each time: a slot where you pass in a different piece of data on every call.

🎯 The challenge of this lesson

Change the double function so it takes two numbers and writes their sum, and call it three times with different pairs.

Practise in the app

Stuck on this lesson?

Write your question and another student — or the teacher — will answer. Your email is never published: it is only used to let you know when someone replies.

Before being published, every message goes through an automatic filter that rejects bad language and any attempt to intimidate another person.

  • Loading the questions…