JavaScript · Lesson 42 of 138
Functions Quiz
Test yourself.
Let's check your function skills. Pause before each answer.

- Five questions
- Pause and think
- Then listen
Question 1
What does a function return if it has no return statement? The answer is undefined.
Quick check
No return statement?
Question 2
What does the arrow function, X, arrow, X times two, return when given five? The answer is ten.
Quick check
(x => x * 2)(5)?
Question 3
What's a closure? The answer is a function that remembers the variables from where it was created.
Quick check
A closure is?
Question 4
What must every recursive function have? The answer is a base case.
Quick check
Every recursive function needs?
Question 5
Which of these passes a callback without calling it? The answer is just the name, with no brackets.
Quick check
Pass without calling?
Summary
Great job. Next, a new section, arrays, for working with lists of values.
Key takeaways- Return values
- Closures remember
- Base cases
Next up: Arrays — lists of values