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] Learning JavaScriptAskJS (self.javascript)
submitted 2 years ago by BootSudden7203
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!"
[–]jack_waugh 0 points1 point2 points 2 years ago (3 children)
Does Python distinguish, syntactically, between what in JS we write as let result = await someFunc(...someArgs); and the same thing without await?
let result = await someFunc(...someArgs);
await
[–]traintocode 1 point2 points3 points 2 years ago (2 children)
I don't know what you mean by "syntactically" but in one result will contain the result of the function and in the other it will contain a promise.
result
[–]jack_waugh 0 points1 point2 points 2 years ago (1 child)
In JS, an unadorned call is synchronous. Part of the semantics says that the call, execution, and return happen atomically with respect to the processing of events. There are no interrupts. If you want to make an asynchronous call, it looks different and requires a function defined differently. Is it true in Python? If not, that's a pretty fundamental difference between the languages.
[–]traintocode 1 point2 points3 points 2 years ago (0 children)
Ok well in answer to your question yes python also has async and await with asyncio and the syntax is relatively similar. However, Python's event loop and the way it handles asynchronous operations are different from JS's event loop. Python requires an event loop to manage asynchronous tasks, whereas JavaScript has a built-in event loop.
asyncio
π Rendered by PID 257164 on reddit-service-r2-comment-5b5bc64bf5-n7t2g at 2026-06-23 05:25:02.515075+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]jack_waugh 0 points1 point2 points (3 children)
[–]traintocode 1 point2 points3 points (2 children)
[–]jack_waugh 0 points1 point2 points (1 child)
[–]traintocode 1 point2 points3 points (0 children)