SLSkillLoop
JavaScript practice

JavaScript Functions Practice

Functions turn repeated logic into reusable code. Practice parameters, return values, function calls, and arrow function syntax with short beginner questions.

Example practice questions

Try these samples, then continue into the JavaScript Practice Labfor guided browser-based practice.

1

What keyword sends a value back from a function?

Answer: return

2

In function add(a, b), what are a and b?

Answer: Parameters

3

What does add(2, 3) represent?

Answer: A function call with two arguments

4

Which syntax creates a simple arrow function?

Answer: const add = (a, b) => a + b;

5

What happens when a function has no return statement?

Answer: It returns undefined.