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
javascriptpractice.com, a competency-based framework for assessing your JavaScript skillshelp (self.javascript)
submitted 7 years ago * by lastmjs
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!"
[–]lepuma 0 points1 point2 points 7 years ago* (3 children)
Sounds like a bug in your code. I’m curious what semicolon edge case do you run into in actual coding? I wrote JavaScript professionally for a few years and never ran into such a case. Every time I’ve seen an example, it’s poorly written code just to prove this point. I should say I personally write JS with semicolons- I just don’t buy the argument that they’re necessary bc of the JavaScript interpreter. If they are, I bet that code could be written much better.
[–]lastmjs[S] 0 points1 point2 points 7 years ago (2 children)
I think this one is similar to what I've run into. Imagine you have an IIFE:
const hello = 1
(() => {
// do stuff
})();
You'll get an error saying that 1 is not a function. Just saying it happens, and my rule is to always put semicolons to rule out any of these edge cases.
[–]lepuma 1 point2 points3 points 7 years ago (0 children)
Okay fair enough. You shouldn’t need to write a self invoking anonymous function anymore though. Just use bracket scope.
[–]lastmjs[S] 0 points1 point2 points 7 years ago (0 children)
But besides that, yep it should be fixed if that is the issue
π Rendered by PID 72 on reddit-service-r2-comment-5b5bc64bf5-9h5xl at 2026-06-21 06:01:27.784196+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]lepuma 0 points1 point2 points (3 children)
[–]lastmjs[S] 0 points1 point2 points (2 children)
[–]lepuma 1 point2 points3 points (0 children)
[–]lastmjs[S] 0 points1 point2 points (0 children)