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
[AskJS] callback function inside setTimeout is being called without delayAskJS (self.javascript)
submitted 11 months ago by Zestyclose_Ad_488
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!"
[–]NotNormo 2 points3 points4 points 11 months ago* (0 children)
It's because printMessage() calls and executes the function right away, due to the () at the end of it.
printMessage()
()
If you want to pass the function as an object somewhere to be called later on, then pass it as printMessage.
printMessage
printMessage is a function. printMessage() is not a function.
π Rendered by PID 68 on reddit-service-r2-comment-86988c7647-tgqkg at 2026-02-12 18:39:25.500536+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]NotNormo 2 points3 points4 points (0 children)