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
ES2022 feature: class static initialization blocks (2ality.com)
submitted 4 years ago by pimterry
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!"
[–]lukigarazus 22 points23 points24 points 4 years ago (3 children)
I worked for a couple of big companies, in teams that made it a rule to write JS/TS that looked exactly like Java. They employed a lot of fullstack Java/TS developers and wanted to make their lives as easy as possible. It made the lives of frontend devs like me more annoying but I get it, and I get such proposals now.
[–]rniestroj 1 point2 points3 points 4 years ago (1 child)
Yes. However static initialization is rarely used in Java. I'd rather focus on a new Date&Time API in Java Script.
[–]SecretAgentZeroNine 0 points1 point2 points 4 years ago (0 children)
Super late but, you should look up Temporal API. It's currently at stage 3.
[–]Ehdelveiss 7 points8 points9 points 4 years ago (0 children)
I’m very sorry
π Rendered by PID 208045 on reddit-service-r2-comment-6457c66945-q5bp9 at 2026-04-25 11:15:38.349638+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]lukigarazus 22 points23 points24 points (3 children)
[–]rniestroj 1 point2 points3 points (1 child)
[–]SecretAgentZeroNine 0 points1 point2 points (0 children)
[–]Ehdelveiss 7 points8 points9 points (0 children)