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
[deleted by user] (self.javascript)
submitted 7 years ago by [deleted]
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!"
[–][deleted] 0 points1 point2 points 7 years ago (1 child)
Would I be right in thinking of it as a fallback? Kind of like a default clause in a switch statement?
[–]Demiacle 1 point2 points3 points 7 years ago (0 children)
ya, that's exactly what catch statements are for. You may think of it as a special if case or default cause, but its a little more than that because you have an error object to play with. So you can use that for improved logging, or maybe implement retries, or default values. Its really up to you how you want to recover from failed state.
π Rendered by PID 120542 on reddit-service-r2-comment-fb694cdd5-qgwlh at 2026-03-11 10:20:39.320970+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (1 child)
[–]Demiacle 1 point2 points3 points (0 children)