Fiveable
Fiveable

Arguments

Definition

In programming, arguments refer to values or variables passed into a function or method when calling it. They provide necessary data for the function to perform its task.

Analogy

Think of arguments as ingredients you give to someone who is cooking for you. The person needs those ingredients (arguments) to prepare your meal (perform their task).

Related terms

Parameters: Variables defined in a function's declaration that represent placeholders for incoming arguments.

Return Value: The result or output produced by a function after executing its code.

Default Arguments: Values assigned to parameters if no corresponding argument is provided during function call.

collegeable - rocket pep

Are you a college student?

  • Study guides for the entire semester

  • 200k practice questions

  • Glossary of 50k key terms - memorize important vocab



© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.


© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.