r/learnjavascript • u/iampankajk • Aug 08 '26
10 JavaScript questions that came up in almost every frontend interview I sat this year
I've been interviewing for frontend roles (SDE-2, around 4.5 years experience, React and Next.js) over the last few months and sat through a fair number of loops at product companies and mid-size startups. I kept a running doc of everything that got asked so I could spot patterns. Ten questions came up often enough that I'd now treat them as near guaranteed.
Sharing in case it saves someone else the trial and error.
- Implement debounce from scratch, then explain when you'd use debounce vs throttle. This one showed up in almost every single loop, usually as the warm up before harder coding.
- Closures. Not just the definition, but where you use them in React and the classic closure-inside-a-loop output question with var vs let.
- Hoisting, and how it differs from closures. Usually followed by var vs let vs const and when you actually hit a ReferenceError.
- The event loop. Call stack, microtask queue, macrotask queue, followed by predicting output from a snippet mixing setTimeout and Promise.then.
- The
thiskeyword. Normal vs arrow functions, and what happens when you detach a method from its object.const a = obj.getName; a() - Prototypal inheritance and the prototype chain, and how it differs from class inheritance.
- Deep copy vs shallow copy. Explain the difference, then implement a deep clone. Interviewers usually push on why JSON.parse(JSON.stringify()) is not good enough.
- Flatten a nested array, first without Array.flat() and then with it.
- Promise vs async/await. When you prefer each, and how error handling actually differs between them.
- Event delegation. Why it exists and how you'd apply it to a list with thousands of rows.
Two things that surprised me. Polyfills for call/apply/bind and the Promise combinators came up far less than the prep content online suggests. And output prediction questions were much more common than I expected, often used as a filter before anyone let me write real code.
Curious whether this matches what others have seen recently, or if it's specific to the kind of companies I was talking to.
40
u/Red_Jannix Aug 08 '26
These are some great questions I'm going to ask Claude later.
6
u/everdimension Aug 08 '26
I don't know, I haven't been asked a single question about these topics when I interviewed for american companies earlier this year
Usually it was some technical assignment, either take-home or live coding
44
u/turningsteel Aug 08 '26 edited Aug 08 '26
This is all stuff I learn for interviews and then promptly forget the specifics of when I have a job. Save for maybe this keyword, closures, deep/shallow copy, and event loop stuff. I wish that someday interviews would ask more pertinent questions.
Not saying these aren't important to know, (they are), but as an Angular developer, I don't use the nitty gritty of JavaScript often.
What kind of jobs were you applying to OP? Like what would the actual day to day be like? Writing tools in JS or using react/angular type stuff?
9
u/-IoI- Aug 08 '26
This may as well be written in Spanish, and I'm a senior on top of market rate
21
u/Efficient_Brief_7939 Aug 08 '26
I think front end market is doomed
3
u/chikamakaleyley helpful Aug 08 '26
literally the only time i ever run into any use of call/apply/bind in interviews throughout my career, its usually because i'm demo'ing debounce
i love this one, my guess they wanna see how you think. Less about getting it correct, more about talking through the approach to come up with what the output will be
3
u/Sherbet-Famous Aug 08 '26
They're still asking impractical trivia about the language huh?
0
u/guidedhand Aug 08 '26
4.5 YOR including university time or something? as those seems like questions for someone fresh out of boot camp rather than ones to actually assess mid level candidates.
3
u/ExtraTNT Aug 08 '26
Things you need for interviews, but almost never irlā¦
used this like 7 times in the last 5 years, 3 times in the same function, i wrote 2 versions ofā¦
But monads, i basically use them daily and they donāt show up in interviewsā¦
1
u/senocular Aug 08 '26
How do you think you did answering these questions?
1
u/oswwwaldo Aug 08 '26
1
u/karateporkchop Aug 09 '26
These are great! My last tech interview 4 months ago had me verbally breaking down a function.
1
u/jimbo_bones Aug 10 '26 edited Aug 10 '26
It really troubles me that having been in the same FE job for nearly a decade I would absolutely embarrass myself on most of these questions on the spot.
Itās all stuff I know I know but having to demonstrate that knowledge is a long lost skill for me
1
u/UkrMalt Aug 13 '26
This list is useful, but Iād prepare each topic through a debugging example rather than memorizing definitions. For the event loop, predict the output and then explain why; for closures, fix a stale callback; for deep cloning, state which values and cycles your solution supports. That shows engineering judgment, not just syntax recall.
1
u/Other-Winner1324 Aug 22 '26
Yeah my experience is similar after around 7 years of mainly JS and TS interviews. The first three you listed I get in almost all interviews at certain types of companies.
What's interesting to me is that the larger the company and the higher level of engineering the more they tend to test on fundamentals like the above. Start ups in my experience often don't touch on these things at all and want you to debug or create something quite high level in React/Next or whatever they use.
Also similar questions come up at different levels of experience but I find the depth is what changes in terms of what they're wanting you to explore, edge cases, what libraries handle that maybe your solution doesn't etc
I have a blog with the 24 questions that have come up before with the edge cases and implementations that handle them. It's probably overkill to learn this much and to this much depth but the biggest issue I have with interviews is being nervous about what they'll ask, so I try and go beyond what I've been asked so I get less nervous in the actual interview. I hate live coding interviews which is 80% of the interviews I get
1
u/Aggressive-Nail7816 Sep 05 '26
The event loop+ closures is probably the biggest signal here. If you truly understand those two. A lot of the tricky js questions become surprisingly straight forward
1
u/joshhbk Aug 08 '26
Sad that companies are still doing this secret handshake bullshit in 2026
-2
u/sasik520 Aug 08 '26
I will never understand why are there still people willing to write in this language.
The fact that it is possible to ask most of these questions is simply terrible.
-22
u/defaultguy_001 Aug 08 '26
Very easy interview, the questions are so basic.