0
Whats an argument?
7 Answers
+ 7
this is the function: validarSalario(event,this)
+ 5
print("hi")
"hi" is the argument lol
+ 5
as you can see those event and this, are arguments of the function
+ 4
is the value the function spect to work with.
https://code.sololearn.com/W8liLhnTTTs3/?ref=app
+ 1
An argument is an expression used when calling the method. For example using range function "list(range(5, 20, 2))" the values "5", "20" and "2" are arguments to range function. It's simple the value/reference being passed to a function.
+ 1
# dez: Referring your latest cross question, "the value of a function.... Then what defines a function? What you have a variable do? Like Print?"
I believe we will study functions later in the course. However to get a glimpse of the difference between the two, a variable holds a value where as a function executes a set of instructions. Hope it makes some sense.
0
the value of a function.... Then what defines a function? What you have a variable do? Like Print?