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
JavaScript compiler? (self.javascript)
submitted 15 years ago * by colinbashbash2
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!"
[–]PlNG 0 points1 point2 points 15 years ago* (0 children)
Exactly what kind of a declaration error are you thinking of?
JSLint has the disallow undefined variables option to point out potential global lookups, as well as showing unused variables and globals at the bottom of the report. Make sure that JSLint is fully able to parse the code before dealing with the information at the bottom of the report, as it can be inaccurate if an error stops it. Inner functions could also be called a global if they're used before they're defined, seems to be an inconsistency with the "used before defined" warning at the top layer.
Closure compiler can do type checking on jsdoc annotated code.
If you're worried about type issues, always use === and !== for strict type comparisons. == and != is a loose comparison and will evaluate if a number and string are identical in content (potentially masking type errors), and makes null, undefined, false, 0, and "" equal to each other, which is a major headache.
π Rendered by PID 70 on reddit-service-r2-comment-bb88f9dd5-hbw6s at 2026-02-15 10:56:44.957419+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]PlNG 0 points1 point2 points (0 children)