3 ms·
"Competant [sic] developers, even those who don’t specialize in JS, should be able to answer this question in 5-6 minutes. Therefore, this is a quick filter."
by kylemaxwell 14y ago
"Competant [sic] developers, even those who don’t specialize in JS, should be able to answer this question in 5-6 minutes. Therefore, this is a quick filter."
This is a false statement. I have programmed for years, but never in Javascript, so I have no clue what "add a cache to a Javascript function" even means. I can quite easily write code "that determines if a number is prime", but the assumption that everybody knows JS even if they don't "specialize" in it is problematic from my PoV.
- cgag 14y agoI think it just means add memoization, I don't think there's anything javascript specific about it.
- thirdhaf 14y agoIf you want to implement it in a general way you still need to know how javascript supports closures though.
- seabee 14y agoThe question actually has nothing to do with JavaScript specifically, it's not much more than 'do you know what memoization is' if I understood it correctly.
- gscott 14y agoI wonder if H1B hires have to go through this process. Does anyone go to India and ask people if they know how to cache an item in Javascript?