I have given this test to programmers now for 5 years. Dozens of - TopicsExpress



          

I have given this test to programmers now for 5 years. Dozens of them. None have even come close to passing it. Originally I did it in PHP, switched it to JS. Same question in both. ------------------------------------------------------------------------------------------------------ Analyze, explain and optimize the following function, written in JS: var A = function () { var B = []; return function (val) { var C; for (C in B) { if(B[C] === val) return true; } B.push(val); return false; } ; }();
Posted on: Mon, 01 Jul 2013 12:52:39 +0000

Trending Topics



Recently Viewed Topics




© 2015