JS Functions Flashcards

1
Q

What is a function in JavaScript?

A

to do something

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

Describe the parts of a function definition.

A
function name(parameter)  {
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the parts of a function call.

A

function name and arguments

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

When comparing them side-by-side, what are the differences between a function call and a function definition?

A
function definition sets up solution
function call , calls what ever that definition does
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between a parameter and an argument?

A

parameters to define the function

argument is what is going to be stored

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