2 ms·
I don't completely disagree with you; but I do have some comments (numbered per your items): 2. In a lot of jobs, the ability to read, maintain, update, and ex
by bcrescimanno 16y ago
I don't completely disagree with you; but I do have some comments (numbered per your items):
2. In a lot of jobs, the ability to read, maintain, update, and extend existing code is considered far more valuable than "building it yourself in your own way." While it's true that there's "more than one way to skin a cat," I'd rather be consistent within a single codebase about how we're skinning that cat. If you can't read and understand code that came before you, you're going to limit your career options to doing nothing but one-off client work.
3. Depends on what you believe "very quickly" means; I would argue that someone who can read and extend preexisting code can work faster than an engineer who wants to build everything him-or-herself.
4. This question isn't a case of performance optimization (though it certainly can be seen that way if you want to talk about the memory and cpu implications of creating tons of functions). This question exposes whether a candidate has an understanding of some pretty fundamental concepts of using closures within javascript and how they impact scoping.
I totally agree that you also want to get a candidate to build something; but this question is very useful at exposing their understanding of how javascript truly works.