Code Editor
Learn

This unit introduced you to functions.

  • Functions are written to perform a task.
  • Functions take data or variables, perform a set of tasks on them, and then return the result.
  • We can define parameters when calling the function.
  • When calling a function, we can pass in arguments, which will set the function's parameters.
  • We can use return to return the result of a function which allows us to call functions anywhere, even inside other functions.

Great work so far. Next up: Scope! Scope informs us where variables are accessible from within our programs.

Instructions

Click 'Up Next' to continue.

Report a Bug
If you see a bug or any other issue with this page, please report it here.