A

Admin • 802.91K Points
Coach

Q. What will this function return?

Code:
function test() {
return;
}
console.log(test());
  • (A) undefined
  • (B) null
  • (C) 0
  • (D) NaN
  • Correct Answer - Option(A)
  • Views: 5
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
A function with a bare return statement returns undefined.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.