Code Ramp
Quiz por , criado more than 1 year ago

Quiz sobre Functions, criado por Code Ramp em 19-04-2018.

318
0
0
Code Ramp
Criado por Code Ramp aproximadamente 6 anos atrás
Fechar

Functions

Questão 1 de 5

1

Functions help make our programs more modular and let us reuse a block of code as many times as we need.

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 2 de 5

1

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);

Selecione uma das seguintes:

  • a parameter

  • an argument

  • the returned value

  • the function name

Explicação

Questão 3 de 5

1

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);

Selecione uma das seguintes:

  • a parameter

  • an argument

  • the returned value

  • the function name

Explicação

Questão 4 de 5

1

Selecione das listas do Menu para completar o texto.

The ( output, input ) of a function is often called a return value. If no value is explicitly provided the function defaults to returning ( undefined, null ).

Explicação

Questão 5 de 5

1

The body of the function is the block of code contained in the curly braces. It may contain any of the following:

Selecione uma ou mais das seguintes:

  • Conditionals

  • Loops

  • Variables

  • Other functions

Explicação