Q. What will this function return?
Code:
function test() {
return;
}
console.log(test());
β
Correct Answer: (A)
undefined
Explanation: A function with a bare return statement returns undefined.