LearnFrenzy
Sign in Take a free test

Functions · JavaScript Functions MCQ · Question 5

A function without return Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 5 Back to Exercise

What does a function return if it finishes without a return statement?

  • A undefined Correct
  • B null
  • C The value of its last expression
  • D 0
Correct Answer: Option A

Only arrow functions with an expression body return implicitly. A normal function body needs an explicit return.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links