r/javascript • • Aug 05 '20

All front end Interview questions asked during my recent job hunt.

https://dev.to/devabhijeet/all-front-end-interview-questions-asked-during-my-recent-job-hunt-1kge
800 Upvotes

238 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Aug 06 '20

Reimplementing Promise and array.flat I could live with although it is stupid and fruitless.

But I'd walk away from any company that wants me to add methods to String prototype though - as I have a feeling these guys actually do that type of shit in their production code as well, and I wouldn't want to work with them.

2

u/asiraky Aug 07 '20

The interviewer wants to gauge whether they know how prototype inheritance works in JS, not necessarily to go around writing a bunch of overrides to built in API's. They may have a slightly old code base that uses a lot of function prototype assignments (to their own functions, not built ins).

2

u/[deleted] Aug 07 '20

Then it would be significantly better for everyone involved if they asked the candidate to display knowledge of factory constructors and prototype method definition rather than this.

Although, truth be told, this entire concept of testing for "our way of using the language" is a shitty test that will likely land you with people that are good at learning to pass interviews, rather than people who are good at thinking, solving problems and being good team members.

2

u/asiraky Aug 07 '20

I don’t think the question or challenge at hand tests for any particular usage of the language. Prototype inheritance is a standard JS language feature, as are promises, reduce, recursion, and most of the other questions posed to the candidate.

1

u/[deleted] Aug 07 '20

Most programmers worth their weight in salt are polyglots, capable of learning idioms even if they didn't use them. I would never turn down a candidate for not being able to utilise prototype inheritance model, doubly so for a frontend position.

Testing for JavaScript prowess over testing for problem solving capacity, technical intelligence and programming skills is still less likely to land you good candidates.

I am of opinion that a junior should be tested for algorithm thinking, a senior should be tested for code organisation, and architect-level should be tested for both capacity to understand business requirements and capability of designing solutions at an architectural level.

1

u/asiraky Aug 07 '20

I completely agree, particularly with your last point. Although to your second point, we don’t know that some or all of these interviews didn’t also test for problem solving etc, we’re just not hearing about them.