The JavaScript exception "return not in function" occurs when a return
statement is called outside of a function.
The JavaScript exception "return not in function" occurs when a return
statement is called outside of a function.
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Bad_return