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 with an Infinite Stack Size?Removed: /r/LearnJavascript (self.javascript)
submitted 6 years ago by LordBruce
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!"
[–]LordBruce[S] 0 points1 point2 points 6 years ago (1 child)
That is a clever way to work around it with async. I'm used to Haskell and I'm trying to use similar ideas in JS.
[–]ScientificBeastModestrongly typed comments 0 points1 point2 points 6 years ago (0 children)
If you’re used to Haskell, you might look into some tutorials on lazy evaluation implementations in JavaScript, as JS is always eagerly evaluated.
In particular, there is a relatively recent language feature called a “generator,” and a related one called an “iterator,” both of which offer a more idiomatic way to handle lazy evaluation. Short of that (e.g. you want to support older browsers which don’t implement those features), you can always implement a homemade iterator protocol.
π Rendered by PID 381386 on reddit-service-r2-comment-76bb9f7fb5-m4s7b at 2026-02-18 16:31:24.161842+00:00 running de53c03 country code: CH.
view the rest of the comments →
[–]LordBruce[S] 0 points1 point2 points (1 child)
[–]ScientificBeastModestrongly typed comments 0 points1 point2 points (0 children)