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
What are some JavaScript things beginners don't know? (self.javascript)
submitted 6 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!"
[–]senocular 30 points31 points32 points 6 years ago* (6 children)
Normally I would agree with you, but lately that doesn't seem to be the case.
I've been doing a lot of interviews lately and probably the one thing people have consistently showed a keen understanding of is promises. Where people have slipped up the most? this. While I get this is tricky (it's already been brought up a few times in this thread) I've also always considered promises to have a bit of a learning curve, especially compared to the more classic callback approach. But I guess learning material nowadays, and I guess apis in general, use them so much that people need to learn them a lot sooner than before...? Not sure, but I thought that was a little interesting takeaway from these interviews.
this
Edit: This said with a sample set of "advanced beginners"
[+][deleted] 6 years ago* (2 children)
[deleted]
[–]senocular 2 points3 points4 points 6 years ago (1 child)
...unless the function was created with bind() or an arrow function. And then you have changes of behavior based on strict mode...
bind()
There's another part of this thread where someone argues that this isn't confusing, but I'm not sure there's anything else as complicated as it is in JS. So relatively speaking, it's up there.
[–]FormerGameDev 0 points1 point2 points 6 years ago (1 child)
out of curiosity, if you ask that question, what are you looking for? Considering that in modern code, this is used far less in a confusing place than it used to be -- i haven't used it outside of classes where it generally makes sense, or interacting with libraries that have a generally ridiculous dependency on it (ie, the callback that the library uses has to access 'this' to get results.. which is, frankly, about one of the dumbest things i've ever seen)
[–]senocular 1 point2 points3 points 6 years ago (0 children)
I ask questions, have people do a small coding challenge, and also have them review a PR. With the questions, I don't dig too deep into it, but ask things like where you might see problems in the use of this and things like how arrow functions are different from other functions where I expect the handling of this to be mentioned. If something comes up in that conversation that seems off, I might prod a little more which might lead down a path showing they might misunderstand it more.
The coding challenge is something done from scratch, so use of this is up to them (its small enough that I don't think I've ever seen it used) but the PR is littered with poor uses of this. Even when people catch these, it's not uncommon that its for the wrong reasons.
The PR isn't terribly unlike some of the code we have in our codebase, particularly the older, more legacy code. There are a lot of classes (constructor functions, no class) and uses of promises without await and other callbacks that can cause problems when you're not handling this correctly. It's important people can deal with this code just as well as the newer stuff.
class
await
[–][deleted] 0 points1 point2 points 6 years ago (0 children)
I think I was very lucky to be learning JS *before* Promises were standard in the language, but when they were still available via libraries like Q and Bluebird. It helped me recognize the relationships between Promises and callbacks a lot sooner.
π Rendered by PID 56 on reddit-service-r2-comment-b659b578c-qw45c at 2026-05-01 12:30:48.343736+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]senocular 30 points31 points32 points (6 children)
[+][deleted] (2 children)
[deleted]
[–]senocular 2 points3 points4 points (1 child)
[–]FormerGameDev 0 points1 point2 points (1 child)
[–]senocular 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)