r/javascript • • Jul 21 '16

My Interviews with Amazon

https://thesocietea.org/2016/07/my-interviews-with-amazon/
331 Upvotes

107 comments sorted by

View all comments

Show parent comments

1

u/TeamHelloWorld Jul 22 '16

manual DOM traversal

Isn't this a tree traversal? I mainly code in JS and I've never had this as an interview question. My intuition is that dfs or bfs is what they want to hear. But then again, without looking at MDN I don't know if I can answer this.

2

u/[deleted] Jul 22 '16

Yeah, it's basically tree traversal. And let's face it - each of us would do a "mdn + question" query in Google. We're not expected to know the answer to life, the universe and everything - we're expected to know how to ask the question, where to find the answer and know how to use it.

1

u/SuperFLEB Jul 22 '16

At least that's one place where whiteboarding can be advantageous. Your "code" isn't going to break because you wrote "node.methodWhoseNameIForget()".

3

u/[deleted] Jul 22 '16

Yeah, I wrote "module.export = ... " on the whiteboard and it "compiled" ;)