// Practice Set · JS Functions · guest

Guest practice: this set is not saved and does not count.

Question 1 of 5 from: Function Path

Which one is a parameter?

function add(a, b) {
  return a + b;
}
let sum = add(2, 3);
Question 2 of 5 from: Function Intro

A function definition must end with a semicolon after the closing }, or JavaScript gives an error.

Question 3 of 5 from: Function Invocation

btn.addEventListener("click", showMenu()); runs showMenu once when the page loads, not when the button is clicked.

Question 4 of 5 from: Function Returns

What does this log?

function check(n) {
  if (n > 3) {
    return "big";
  }
  console.log("not big");
  return "small";
}
console.log(check(5));
Question 5 of 5 from: Function Returns

A function that never reaches a return statement gives back undefined.

Ready to submit?

Click a question to go back and check it. After you submit, you will see the right answer and an explanation for every question. As a guest, nothing is saved.