Answer:
In JavaScript, a function without a return statement implicitly returns a value of undefined. This doesn't necessarily mean the function has no effect, as it can still perform actions or manipulate variables within the program. Therefore, the correct multiple-choice option is (C).
Step-by-step explanation:
When a function in JavaScript does not end with a return statement, it does not return the variables within its local scope, nor does it throw an exception. Instead, the function returns a value of undefined. This is a fundamental concept in JavaScript, as every function returns something, even if it is not explicitly stated. If a function fails to explicitly return a value, JavaScript implicitly returns undefined at the end of the function execution.
However, this does not mean that the function has no effect on the application; a function without a return statement can still impact the program by modifying global variables, manipulating objects passed by reference, or performing actions such as writing to the console or DOM. Therefore, the correct multiple-choice option is (C).