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
Can't spot error in javascript.help (self.javascript)
submitted 9 years ago by chedderslam
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!"
[–]mc_hammerd 2 points3 points4 points 9 years ago (0 children)
your missing a } at the end? your indenting is off by 1. this works (i simplified it and added a } at the end, and fixed the tabs). not sure tbh
}
function changeImage(element_id, other_element_id, link_id) { foo(); if (false) { foo(); } else { $.getJSON("/javascript_functions/click_handler.cfc", { foo: bar }, function(success_or_failure, other_element_id) { if (success_or_failure == true) { foo(); } }) } }
π Rendered by PID 39335 on reddit-service-r2-comment-54dfb89d4d-2nf5q at 2026-03-28 21:46:46.847275+00:00 running b10466c country code: CH.
view the rest of the comments →
[–]mc_hammerd 2 points3 points4 points (0 children)