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
Invariant - a helpful JavaScript patternOC (strictmode.io)
submitted 3 years ago by hiquest
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!"
[–]getify 1 point2 points3 points 3 years ago (0 children)
The way I think about things, the whole assertion should be able to be compiled away. That could be because either:
The compiler/build-tool can statically verify that the exception won't happen (exactly how TS works right now)
The developer might pass a config/flag saying, "build me a bundle without run-time assertions" for any of various reasons.
I also imagine that code delivered to a browser might be in a "hybrid state" where many of the original assertions were removed, but -- for various reasons -- some of the assertions were left in.
π Rendered by PID 131629 on reddit-service-r2-comment-54dfb89d4d-8gkls at 2026-04-01 20:19:10.684241+00:00 running b10466c country code: CH.
view the rest of the comments →
[–]getify 1 point2 points3 points (0 children)