Home » JavaScript » JavaScript Functions » Question
  1. What will happen if a return statement does not have an associated expression?
    1. It will throw an exception
    2. It will throw an error
    3. It returns the value 0
    4. It returns the undefined value
    5. None of these
Correct Option: D

A function without a return statement will return a default value. ifthe return statement does not have an associated expression then it returns an undefined value.



Your comments will be displayed only after manual approval.