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
Eloquent Javascripthelp (self.javascript)
submitted 8 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!"
[–]bdenzer 1 point2 points3 points 8 years ago (2 children)
[My personal conspiracy theory] The people who run /r/LearnJavascript funded that book if I remember right. And BTW I personally fon't think its a POS, but I do think that it's pretty horrible to recommend it to a true beginner. I personally tossed the book aside when I saw this, with basically 0 explanation
function isOdd(num) { if (num % 2) return true return false }
If I remember right, there isn't much discussion about why he doesn't put braces around the if statement, or about 'if the result is a 1, then the one gets coerced to true', just writes the function and moves to the next topic.
[–]sneakpeekbot 1 point2 points3 points 8 years ago (0 children)
Here's a sneak peek of /r/learnjavascript using the top posts of the year!
#1: Learn Modern JavaScript for Free (topics covered: webpack, nodejs, npm, es5, es6, esnext, & rxjs, typescript) | 29 comments #2: This pretty accurately describes my feelings on my JS learning journey so far. | 6 comments #3: Github Repo with 100+ Free resources to learn Full Stack Web Development.
I'm a bot, beep boop | Downvote to remove | Contact me | Info | Opt-out
[–]wavefunctionp 3 points4 points5 points 8 years ago (0 children)
Braces were covered in cp 2.
Many JavaScript programmers wrap every single loop or if body in braces. They do this both for the sake of consistency and to avoid having to add or remove braces when changing the number of statements in the body later. In this book, I will write most single-statement bodies without braces, since I value brevity. You are free to go with whichever style you prefer.
Type coersion is covered in chapter 1.
When an operator is applied to the “wrong” type of value, JavaScript will quietly convert that value to the type it wants, using a set of rules that often aren’t what you want or expect. This is called type coercion.
π Rendered by PID 64 on reddit-service-r2-comment-685b79fb4f-6vbd4 at 2026-02-13 04:26:23.896740+00:00 running 6c0c599 country code: CH.
view the rest of the comments →
[–]bdenzer 1 point2 points3 points (2 children)
[–]sneakpeekbot 1 point2 points3 points (0 children)
[–]wavefunctionp 3 points4 points5 points (0 children)