🌐
W3Schools
w3schools.com › js › js_function_parameters.asp
JavaScript Function Parameters
Parameters are listed inside the parentheses in the function definition.
🌐
PHP
php.net › manual › en › functions.arguments.php
PHP: Function parameters and arguments - Manual
Example #15 Same example as above with a different order of parameters · <?php array_fill(value: 50, count: 100, start_index: 0); ?> Named arguments can be combined with positional arguments. In this case, the named arguments must come after the positional arguments. It is also possible to specify only some of the optional arguments of a function, regardless of their order.
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Functions
Functions - JavaScript - MDN Web Docs
A list of parameters to the function, enclosed in parentheses and separated by commas. The JavaScript statements that define the function, enclosed in curly braces, { /* … */ }. For example, the following code defines a function named square:
🌐
W3Schools
w3schools.com › c › c_functions_parameters.php
C Function Parameters
When a parameter is passed to the function, it is called an argument. So, from the example above: name is a parameter, while Liam, Jenny and Anja are arguments.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Glossary › Parameter
Parameter - Glossary - MDN Web Docs
... const argument1 = "Web"; const argument2 = "Development"; example(argument1, argument2); // passing two arguments // This function takes two values function example(parameter1, parameter2) { console.log(parameter1); // Output = "Web" console.log(parameter2); // Output = "Development" }
🌐
Codecademy
codecademy.com › forum_questions › 556b89ef9113cbccd3000323
Don't Understand Parameters | Codecademy
We can over-simplify things when we leave out too much information, and result in more confusion being created down the road. For instance this line, “Parameters are essential to functions, because otherwise you can’t give the function-machine an input.” Not so.
🌐
TypeScript
typescriptlang.org › docs › handbook › 2 › functions.html
TypeScript: Documentation - More on Functions
For example, let’s say you wrote a function to combine two arrays: ... "hello"]);Type 'string' is not assignable to type 'number'.2322Type 'string' is not assignable to type 'number'.Try · If you intended to do this, however, you could manually specify Type: ... Writing generic functions is fun, and it can be easy to get carried away with type parameters.
🌐
Runestone Academy
runestone.academy › ns › books › published › fopp › Functions › FunctionParameters.html
12.4. Function Parameters — Foundations of Python Programming
In the definition, the parameter list is sometimes referred to as the formal parameters or parameter names. These names can be any valid variable name. If there is more than one, they are separated by commas. In the function invocation, inside the parentheses one value should be provided for each of the parameter names.
Find elsewhere
🌐
iBiblio
ibiblio.org › swaroopch › byteofpython › read › function-parameters.html
Function Parameters
Here, we define a function called printMax where we take two parameters called a and b.
🌐
Rebus Community
press.rebus.community › programmingfundamentals › chapter › parameters-and-arguments
Parameters and Arguments – Programming Fundamentals
December 15, 2018 - If the CalculateCelsius function is called passing in the value 100, as in CalculateCelsius(100), the parameter is fahrenheit and the argument is 100. The terms parameter and argument are often used interchangeably.
🌐
4JS
4js.com › online_documentation › fjs-fgl-manual-html › fgl-topics › c_fgl_Functions_parameters.html
Genero Business Development Language - Function parameters
In the following code example, the variable x defined in the MAIN block will not be modified by the function: MAIN DEFINE x INTEGER LET x = 123 CALL myfunc(x) DISPLAY x -- displays 123 END MAIN FUNCTION myfunc(x) DEFINE x INTEGER LET x = x + 1 END FUNCTION · Parameters of type TEXT and BYTE ...
🌐
TutorialsPoint
tutorialspoint.com › javascript › javascript_function_parameters.htm
JavaScript - Function Parameters
It contains all passed arguments while invoking the function in the array format. We can traverse through the array and get each argument even if the function's parameters are not specified. In the example below, the function definition doesn't contain any parameters, but we have passed the ...
🌐
Wikipedia
en.wikipedia.org › wiki › Parameter_(computer_programming)
Parameter (computer programming) - Wikipedia
January 19, 2026 - The term parameter (sometimes called ... supplied at a function call statement. For example, if one defines a function as def f(x): ..., then x is the parameter, and if it is called by a = ...; f(a) then a is the argument....
🌐
Weber State University
icarus.cs.weber.edu › ~dab › cs1410 › textbook › 6.Functions › args.html
6.3. Function Arguments and Parameters
Nevertheless, arguments are the ... and sent to to a function. Parameters are local variables defined in the function (inside the parentheses in the function header) and used to hold the data passed into it. The following example, based on pass-by-value, is the default ...
🌐
GeeksforGeeks
geeksforgeeks.org › dsa › function-parameters-in-programming
Function Parameters in Programming - GeeksforGeeks
March 27, 2024 - Function Parameters are variables that are specified within the parentheses of a function definition. They represent the data that a function expects to receive when it is called. Parameters allow you to pass values into a function so that the function can perform its task using those values.
🌐
Reddit
reddit.com › r/learnpython › please help me understand functions and parameters..
r/learnpython on Reddit: Please help me understand functions and parameters..
February 3, 2023 -

I am trying really hard to understand specifically parameters. Particularly, when I define a function I.e. def function(parameter): print(parameter) And then call it function("a simple string") Is the parameter always going to be parameter? It's receiving a value, right? So... Maybe I'm like mentally deficit... or overthinking this, but what if I do..

def function(parameter0, parameter1, parameter3)
    print(parameter0, parameter1, parameter3)

And then call the function

function("Does this cause an error?", "Must have exact values", "for each parameter?")

Am I over thinking this? I'm just following lessons from a PDF. Python for the absolute beginner

I'm must confused and I'm not even sure how or why I'm confused.

  • Edit: formatting and typos

  • Update: Thanks everyone for your help. I think I am understanding it. I believe I'm overthinking it, and over reacting. Sorry for being difficult.

Top answer
1 of 4
5
So, taking a swing at it....the parameter(s) in Python are just a way of telling the function that it should be receiving one or more objects/pieces of information. How you write the function determines what type of object those things need to be. Per your example, def funct(param): print(param) Can be used with any type of object that can be printed out to the console; like: func(23) func("Hello, Timmy") will print out the value 23, and then the string "Hello, Timmy" What this, also, means is that you can assign things to variables and pass those variables in to the parameter spot (referred to as an argument when calling the function) and they will still be the object/type of object that you assigned earlier. a = [2, 5, 7, 9] func(a) will print [2, 5, 7, 9] out to the console. Does that help?
2 of 4
4
Everything in Python is an object (including integers, lists, functions, classes, etc) Variables are just names that refer to objects An object can have several names that refer to it, but each name can only directly refer to a single object (although that object can be a collection of other objects, like in a list or tuple) An area of code where a set of names is accessible is called a namespace (modules (files) and functions both hold a local namespace, and a function can access its local namespace as well as the global namespace of the module it’s being called in) When defining a function, the parameters define the names of the objects that get passed in to its local namespace (regardless of any extra names that may refer to those objects outside a function call), so those names can be used throughout the function (but are not accessible from outside the function) When calling a function the parameters are used to pass in objects this can be positionally, as in your example, or as keyword-arguments that specify which parameter name should be assigned to which object (e.g. my_func(a, 3, param=[], param8=var)) it doesn’t matter if the objects are passed in as literals (e.g. 3, "string") or variables - just the object (the “value”) is passed in and bound to the relevant parameter name Python interprets code from top to bottom If you define a new function with the same name as some other object, then that name now refers to that function, and has no memory of what it used to refer to (just like if you do a=3 and then later in your code do a=4)
🌐
SheCodes
shecodes.io › athena › 123543-example-of-function-parameters-in-javascript
[JavaScript] - Example of Function Parameters in JavaScript | SheCodes
Learn how to use function parameters in JavaScript and pass values into a function for it to use and perform operations on.
🌐
Learn C++
learncpp.com › cpp-tutorial › introduction-to-function-parameters-and-arguments
2.4 — Introduction to function parameters and arguments – Learn C++
January 25, 2015 - Function printDouble then uses the value of parameter value. ... In the above problem, we can see that variable num is only used once, to transport the return value of function getValueFromUser to the argument of the call to function printDouble. We can simplify the above example slightly as follows:
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Functions › Default_parameters
Default parameters - JavaScript - MDN Web Docs
However, it's often useful to set a different default value. This is where default parameters can help. In the following example, if no value is provided for b when multiply is called, b's value would be undefined when evaluating a * b and multiply would return NaN.