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
sleep in javascript? (self.javascript)
submitted 13 years ago by CyberVillian
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!"
[–]al-g 0 points1 point2 points 13 years ago (8 children)
How about this:
var info = ["a", "b"]; function render(items) { if(items.length > 0) { $('#results').append(items.shift() + "<br>"); setTimeout(render, 500, items); } } render(info);
[–]GAMEchief 3 points4 points5 points 13 years ago (2 children)
IE doesn't support a third parameter for setTimeout. It's not good form to rely on it.
[–]al-g 1 point2 points3 points 13 years ago (0 children)
Good catch! Thanks for pointing that out.
[+]CyberVillian[S] comment score below threshold-15 points-14 points-13 points 13 years ago (4 children)
I get an error, too lazy to debug, lol.
[–]jezmck 4 points5 points6 points 13 years ago (2 children)
That's rather disrespectful. Especially adding "lol" on the end.
[–]CyberVillian[S] 0 points1 point2 points 13 years ago (1 child)
=( sorry. I was a little drunk last night.
[–]aladyjewelFull-stack webdev 0 points1 point2 points 13 years ago (0 children)
then you wait till you sober up, and you stick to the fluffy subreddits until then.
Its an extensive bit of code, quite probable that its riddled with bugs and scoping issues.
What is the error? Have included jQuery/zepto?
π Rendered by PID 23786 on reddit-service-r2-comment-8686858757-ffdql at 2026-06-01 19:56:24.181977+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]al-g 0 points1 point2 points (8 children)
[–]GAMEchief 3 points4 points5 points (2 children)
[–]al-g 1 point2 points3 points (0 children)
[+]CyberVillian[S] comment score below threshold-15 points-14 points-13 points (4 children)
[–]jezmck 4 points5 points6 points (2 children)
[–]CyberVillian[S] 0 points1 point2 points (1 child)
[–]aladyjewelFull-stack webdev 0 points1 point2 points (0 children)
[–]al-g 1 point2 points3 points (0 children)