Tech IndustryDec 25, 2021
MathWorksmbKd10

Experience with using JavaScript in interviews

Any downsides in using JavaScript for coding interviews? I would like know your experience using it. I am aware of the fact that there are some data structures not available out of the box in JS. How to navigate this issue during the interviews? YoE: 10 yrs TC: 185K

Robinhood kceg82 Dec 25, 2021

I've always used JavaScript and never had a problem. I also have never asked a question where JavaScript wasn't a feasible choice.

MathWorks mbKd10 OP Dec 25, 2021

Have you used it in FAANG and top tech interviews? How did you deal with problems that involved priority queues and stuff?

Google steveJobs9 Dec 25, 2021

I used it in Google, One problem i faced is there are less interviewers in JS. So my interview got scheduled after few extra days than normal languages

Wellington Management hmm19 Dec 25, 2021

Pick only if you’re comfortable with it - n dimensional matrix/ priority queue for instance if going to be tricky.

MathWorks mbKd10 OP Dec 25, 2021

How to deal with a priority queue based question then? Can I code the solution assuming there is a priority queue DS out of the box?

The Climate Corporation TSTk67 Dec 25, 2021

If you're in an interview where you don't have to run the code, or one with external libraries, it should be fine

Google TC: $335k Dec 25, 2021

no heaps, no treemap. everything else should be fine though

Pluralsight hames Dec 25, 2021

I love javascript for coding interviews! Its so much less typing than c#/java. No semicolon, declaring map, set, object, array is just so much simpler in js compared to c#! For the missing data structures, i have said something like js doesnt have a native support for priority queue so I would import some external package in real world but for the sake of the interview, I will use the api of java/c# priortiy queue. This approach only works where you dont have to actually run your code.

Pluralsight hames Dec 25, 2021

Btw I haven’t had much success with my interviews, so may don’t do what I said 🤷‍♀️

MathWorks mbKd10 OP Dec 25, 2021

I like the simplicity of writing code in JS too. I hope what you suggested is acceptable.

Google poo eubri Dec 25, 2021

I use JS for all my whiteboard interviews. It's been fine.

MathWorks mbKd10 OP Dec 25, 2021

Did you have any interviews where you had use to an editor and output mattered?

Google poo eubri Dec 25, 2021

Not in JS. I did one in Java, though I don't remember if they asked me to do Java or I did. I feel like JS doesn't really have much of an advantage when you have an editor at hand.

Meta nomai Dec 25, 2021

Did dozens of interviews using js. Got multiple offers from faang and other big tech (fb included) It is perfectly fine. For priority queue just make up an api. If they expect you to run code (most dont) then I would implement a very simple pq with a sorted array and make it clear that there is better way to do it

Amazon not amazon Dec 25, 2021

Make sure to avoid complicated syntax. I once nearly rated lower candidate for having something like arr = [] for c in container { arr[i] = c]} <-- arr[i], assign ith without pre-allocating I thought that will cause NPE or something but when tested in console, apparently it works. SO AVOID STUFF LIKE THAT, you can get someone worse than me who will assume npe without testing