How was your JavaScript interview this 2018?
Senior role interview probably vary a lot more than a typical mid-level interview, since from my experience there's a different meaning to 'Senior' everywhere. Some places it's more of a managerial role, others its more of a technical knowledge role. Nevertheless last time I interview it was for a place that also uses primarily React and Node. Here's a general gist of what I was asked for a mid-level Front-end interview with some Node added since I would be expected to write some of that as well:
A lot of basic to intermediate js questions. Things like context/
thisin Javascript. Prototype knowledge, inheritance model, asynchronous behavior (callbacks, promises, async/await, a little bit of generators but only because I mentioned it), the event loop/callback queueReact specific questions revolved around patterns like Higher order Components, Render Props/Function as child, why use React in the first place? Comparison to past popular frameworks as well as current ones (since I was coming from a place that used Vue), JSX vs templates, asking about past projects, etc.
Node questions revolved around more of the event loop, general http questions, a little graphQL (i had never used it but heard of it), some specific framework knowledge around express/koa (they don't use express).
I was interviewing for more of a Front-end focused role, but expected some Node stuff anyway. Not as much around Node was asked, but a lot around general JS stuff. So the interview also consisted of a lot of knowledge around CSS, general layout best practices (semantic html), performance in the browser, etc.
More on reddit.comBest List of Frontend JavaScript Interview Questions (by a Frontend Engineer)
I am not a fan of questions that ask CS fundamentals. I have never had to implement BinarySearchTree as part of my job. It has no value and doesn't indicate anything about the candidate being able to perform his/her job except remembering what they did in college
The best question on this is:
My website is slow. Walk me through diagnosing and fixing it. What are some performance optimizations people use, and when should they be used?
Otherwise not sure the value of memorizing how to implement quickSort or MergeSort will help you be a valued front-end member of the team.
What I would prefer to see as questions asked:
Can you explain how eventing works in node / JS?
Can you build an event emitter?
Can you explain the difference between declarative programming vs. imperative programming? Can you give an example?
I have an error in this code sample.. can you go through and fix the problem? How would you approach fixing the problem? What tools would you use?
How would you refactor this code piece? What are some code smells? What would you do about testing?
If you are hitting an API and all of a sudden you get an error. What do you do? What if the errorcode is a 500? 404? 429?
JavaScript has class syntax from es6 onward. Why would you use it? What is JS compiler actually doing when you write a class syntax? What is prototypical inheritance? What write methods on the prototype?
CSS questions? Flexbox? Grid? Box Model? BEM?
JavaScript/ES6 Tech Interview Exercise: Connect Four Solver
This was an awesome watch. I've never had to do this exercise myself. I was like, "okay, yep, uh huh," while he implemented the 4 in a row checker the first time (though using default args was probably not something I would've thought of on the spot)—but then the regex refactor happened and it was so clean.
Definitely came away from this with a couple new tools in my repertoire. Subscribed immediately.
More on reddit.comJavaScript / Front-End Interview Questions?
Explain hoisting
difference between arrow function and regular ones,
difference between let and var,
is a const variable immutable?
if you look good ans wrote in your resume you worked on a framework, I'll probably asked questions on rendering cycle & strategies
if you said you had experience with node's, what's common JS and how is it different from es6 modules
functional programming is popular, could you give me a definition and an example of it (whatever piece of code that shows some currying or function composition would be fine)
usually we show them a PR and ask them to do a review on it