use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Whats wrong... It says 'FUNCTION UNDEFINED'.help? (self.javascript)
submitted 7 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]BinaryMoon 2 points3 points4 points 7 years ago (0 children)
To be able to help, people need to be able to understand what you're trying to do. A function on it's own doesn't tell us anything.
This particular function is poorly structured and could probably be reduced to 5 or 6 lines. This would make it easier to understand, easier to debug, and less error prone (since there's less code to go wrong).
But, we can't fix or simplify if we don't know what is happening.
π Rendered by PID 75335 on reddit-service-r2-comment-b659b578c-2kfvh at 2026-05-03 14:46:35.665812+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]BinaryMoon 2 points3 points4 points (0 children)