Functions help make our programs more modular and let us reuse a block of code as many times as we need.
Responda
True
False
Questão 2
Questão
In the following code we are both defining and then calling a function. What does `a` represent in this example?
function findSum(a, b) {
return a + b;
}
var sum = findSum(5, 8);
console.log(sum);
Responda
a parameter
an argument
the returned value
the function name
Questão 3
Questão
In the following code we are both defining and then calling a function. What does `8` represent in this example?
function findSum(a, b) {
return a + b;
}
var sum = findSum(5, 8);
console.log(sum);
Responda
a parameter
an argument
the returned value
the function name
Questão 4
Questão
The [blank_start]output[blank_end] of a function is often called a return value. If no value is explicitly provided the function defaults to returning [blank_start]undefined[blank_end].
Responda
output
input
undefined
null
Questão 5
Questão
The body of the function is the block of code contained in the curly braces. It may contain any of the following:
Responda
Conditionals
Loops
Variables
Other functions
Quer criar seus próprios Quizzesgratuitos com a GoConqr? Saiba mais.