Javascript Functions Flashcards

1
Q

What are the five parts of a function definition?

A
  • The function keyword
  • The name of the function
  • A list of parameters, enclosed in parentheses and separated by commas.
  • Javascript statements that define the function. Enclosed in curly braces.
  • Return statement.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you call a function?

A

You can call a function with the function name and argument.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between a parameter and an argument?

A
  • Function parameters are the names listed in the function’s definition.
  • Function arguments are the values passed to functions when it is invoked.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly