Code Ramp
Quiz von , erstellt am more than 1 year ago

Quiz am Functions, erstellt von Code Ramp am 19/04/2018.

318
0
0
Code Ramp
Erstellt von Code Ramp vor etwa 6 Jahre
Schließen

Functions

Frage 1 von 5

1

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

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 2 von 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);

Wähle eine der folgenden:

  • a parameter

  • an argument

  • the returned value

  • the function name

Erklärung

Frage 3 von 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);

Wähle eine der folgenden:

  • a parameter

  • an argument

  • the returned value

  • the function name

Erklärung

Frage 4 von 5

1

Wähle von der Dropdown-Liste, um den Text zu vervollständigen.

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

Erklärung

Frage 5 von 5

1

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

Wähle eine oder mehr der folgenden:

  • Conditionals

  • Loops

  • Variables

  • Other functions

Erklärung