Functions

Description

Quiz on Functions, created by Code Ramp on 19/04/2018.
Code Ramp
Quiz by Code Ramp, updated more than 1 year ago
Code Ramp
Created by Code Ramp over 6 years ago
327
0

Resource summary

Question 1

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

Question 2

Question
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);
Answer
  • a parameter
  • an argument
  • the returned value
  • the function name

Question 3

Question
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);
Answer
  • a parameter
  • an argument
  • the returned value
  • the function name

Question 4

Question
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].
Answer
  • output
  • input
  • undefined
  • null

Question 5

Question
The body of the function is the block of code contained in the curly braces. It may contain any of the following:
Answer
  • Conditionals
  • Loops
  • Variables
  • Other functions
Show full summary Hide full summary

Similar

Translations and transformations of functions
Christine Laurich
Food Technology - Functions of ingredients
evie.daines
Respiratory System
Addeana
Algebra Quiz
Norman McBrien
Functions of a Political Party
Phoebe Fletcher
Flash cards on cardiovascular system
offintowonderland
Basic Derivative Rules
Bill Andersen
The brain
Brianna Urena
JavaScript Fundamentals
Andrew Watters
The Nervous System
Mattie Condon
Membrane structure & function
kenzieaj14