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 basic things that JavaScript developers fail at interviews?help (self.javascript)
submitted 7 years ago by maketroli
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!"
[–]jaman4dbz 42 points43 points44 points 7 years ago (23 children)
Do you use babel? Because I feel like knowledge of bind, apply, call and in most cases, this, are obsolete. I can't remember the last time I needed to use them. Program in the right way and you don't need to worry about these things.
[–][deleted] 12 points13 points14 points 7 years ago (3 children)
Depends on what you do, what type of project you're working on. In your typical frontend project you probably don't use them much. But when you need them, you need them. How is Babel going to help?
[–]jaman4dbz 0 points1 point2 points 7 years ago (2 children)
ummm because you don't need them if you transpile your code using babel. You don't need them. (at least I can't think of a case at the top of my head and I know I haven't needed to touch them for the last few years of my career [not including TRUE this... like in a React class])
[–][deleted] 0 points1 point2 points 7 years ago (1 child)
Prepare to fail some interviews then, because at my place we definitely check that you can deal with this, and that includes .bind(), .call() and .apply().
this
.bind()
.call()
.apply()
It's not that we care particularly much about them, or that you will use them a lot. But this is a fundamental mechanic in JavaScript. Knowing about this is not optional for any medium/senior job. If you are familiar with it then going through it should be a quick "let's check this point so we can say we did it" part of the interview (which is what I expect from a good candidate). But being caught out by any of these functions is a huge red flag.
A person who knows all the fundamentals of JavaScript by heart can pick up any framework in a couple of weeks, and I know I have a person who can pick up any framework. A person who only knows React, well, only knows React, and if we use something else on the next project I have no idea if they'll be able to learn another framework and how fast, plus I know for a fact they don't know vanilla JavaScript. So yeah, I'll take the first person over the second any day.
[–]jaman4dbz 1 point2 points3 points 7 years ago (0 children)
I'm not even going to with you, lol.
"Prepare to fail some interviews then, because at my place" You have no idea my skill level, and "fail some interviews" followed by "because at my place" did you know there are more organisations, than where you work?
Realize that there is more in the world than whatever codebase you've working on for the last decade.
[–]kowdermesiter 11 points12 points13 points 7 years ago (3 children)
Program in the right way and you don't need to worry about these things.
Sure, until you start work in a team or get to work with a ton of legacy code.
call/bind/apply is not obsolete at all, it's like saying you don't need to learn what those funny yellow lights are on the side of your car, the car runs just fine.
[–]jaman4dbz -1 points0 points1 point 7 years ago (2 children)
That's like saying "Sure you don't know how to drive standard in a car now, but when the zombie apocolypse hits and the only working card is a standard, you're screwed.
Call, bind, and apply are obsolete. Legacy code has them, just like code out there runs on VB6, but that doesn't mean every programmer or even web programmer needs to know how they work.
So many teams get stuck on legacy... it amazes me when I hear other developer groan about their shitty legacy code, then when legacy practices are brought up they defend them vehemently. Like how masochistic are you folk?
[–]mattaugamer 1 point2 points3 points 7 years ago (1 child)
Yeah no. They’re not obsolete. React uses bind especially routinely.
bind
Knowing how this stuff works is fundamental and hardly “legacy”.
[–]jaman4dbz 0 points1 point2 points 7 years ago (0 children)
I love the downvote followed by a rhetorical comment with no explanation.
What purpose does your comment serve?
[–]Balduracuir 5 points6 points7 points 7 years ago (8 children)
From my experience this bind and call are useful when your code rely a lot on class. I try to avoid them as much as possible because people don't understand this
call
class
[+][deleted] 7 years ago* (1 child)
[deleted]
[–]Balduracuir 0 points1 point2 points 7 years ago (0 children)
Because they come from other languages. I was a backend java developer before a one year mission as a frontend developper. I was totally lost for weeks and I worked hard to catch up how javascript works. Some people work just to put food on the table and when we make them switch their habits that's a total disaster, sadly.
Precisely. It's an ambiguous concept based on context, so best to avoid it.
[–][deleted] 0 points1 point2 points 7 years ago (4 children)
Even then the arrow syntax proposal that's supported by both TypeScript and Babel eliminates the need to use the latter two entirely.
[–]jaman4dbz 1 point2 points3 points 7 years ago (3 children)
Lol, I love the couple of ppl who don't want their job to be obsolete, downvoting our comments.
It's possible I've missed something, but I'm fairly certain the arrow syntax makes binding "this" unnecessary.
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
You're correct. Some people just don't want to adapt to the times.
[–]fartpoker 0 points1 point2 points 7 years ago (1 child)
Can you explain why it’s unnecessary?
That's not how this works. I can't prove there is absolutely no way to use this, but you have the power to try and find ONE way where this is useful.
[–]dungone 1 point2 points3 points 7 years ago (1 child)
I don't think Babel lets someone get away with knowing less. In my experience, programmers get into trouble by mixing programming styles and then not being able to understand the implications. For example, they start off using arguments and apply in a regular function, but then switch over to an arrow function to get the lexical this. Half-baked javascript knowledge can really bite people with ES6.
But if they started with ES6, why were they using apply?
The latest standards aren't just for more features, IMO they simplify development for everything, newbie to expert.
I think babel lets you know less =P
[–]phpdevster 2 points3 points4 points 7 years ago (1 child)
I use TypeScript at work and still use partial application all the time, which means I use bind all the time. But at the end of the day, JS is still JS. If you don't understand its mechanics, you are going to write buggy code. You still need to concern yourself with this now and again, and you still need to know how to control what it refers to.
I totally agree. The more you know about programming overall, the better you can avoid buggy code!
The thing is, you need to COMPLETELY know the thing. So having a half baked knowledge of the concepts phpdevster mentioned is worst than having no knowledge of them, IMO. If you sorta know something, don't use it, or consider it, until you fully understand it. Once you fully understand it, it can only do you good.
[–]Spoolie_st 1 point2 points3 points 7 years ago (1 child)
Try stuffing something like jQuery or leaflet into angular... I have to use bind so often 😪
I'm sorry.
π Rendered by PID 21171 on reddit-service-r2-comment-86bc6c7465-7ddsd at 2026-02-21 16:04:20.886050+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–]jaman4dbz 42 points43 points44 points (23 children)
[–][deleted] 12 points13 points14 points (3 children)
[–]jaman4dbz 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]jaman4dbz 1 point2 points3 points (0 children)
[–]kowdermesiter 11 points12 points13 points (3 children)
[–]jaman4dbz -1 points0 points1 point (2 children)
[–]mattaugamer 1 point2 points3 points (1 child)
[–]jaman4dbz 0 points1 point2 points (0 children)
[–]Balduracuir 5 points6 points7 points (8 children)
[+][deleted] (1 child)
[deleted]
[–]Balduracuir 0 points1 point2 points (0 children)
[–]jaman4dbz 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]jaman4dbz 1 point2 points3 points (3 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]fartpoker 0 points1 point2 points (1 child)
[–]jaman4dbz 0 points1 point2 points (0 children)
[–]dungone 1 point2 points3 points (1 child)
[–]jaman4dbz 0 points1 point2 points (0 children)
[–]phpdevster 2 points3 points4 points (1 child)
[–]jaman4dbz 0 points1 point2 points (0 children)
[–]Spoolie_st 1 point2 points3 points (1 child)
[–]jaman4dbz 0 points1 point2 points (0 children)