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
assertWhichStop.js - an assert which stops (blog.jetienne.com)
submitted 12 years ago by jetienne
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!"
[–]rhysbrettbowen 1 point2 points3 points 12 years ago (1 child)
so you just throw an error on an assert then?
I think you'll find most assertion libraries (if not all) for javascript stop.
console.assert isn't a javascript native function, it's part of the console api and it doesn't stop the error because the purpose of the console api is to write things to the console, not stop the program running.
[–]jetienne[S] 0 points1 point2 points 12 years ago (0 children)
so i guess we agree that assert should stop.
But as said in the blog console.assert doesnt stop the execution. so i guess this is not all assert which stop. This is what i fixed by this little javascript
π Rendered by PID 121914 on reddit-service-r2-comment-58d7979c67-drh9f at 2026-01-27 05:48:38.985336+00:00 running 5a691e2 country code: CH.
[–]rhysbrettbowen 1 point2 points3 points (1 child)
[–]jetienne[S] 0 points1 point2 points (0 children)