Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

14
  • 38
    I ... what ... how ... where did you read that? On The Onion? Commented Apr 6, 2016 at 18:47
  • 17
    That link you give says defining functions inside loops can lead to bugs. It's not talking about calling functions. Commented Apr 6, 2016 at 18:54
  • 3
    Not quite sure why it's getting downvoted though, it's a legitimate question that could possibly educate others. If you don't like that it was asked, simply move on. Commented Apr 6, 2016 at 19:07
  • 4
    @8bittree In which case the link is correct, and the advice is highly specific to JavaScript's scoping rules. Commented Apr 6, 2016 at 19:28
  • 3
    You misread something. It happens. Do you still feel this question is going to benefit anyone? Questions that don't benefit other programers tend to get down voted. Commented Apr 6, 2016 at 19:49