re: 5 Unusual Test Questions I Got While Interviewing for Web Dev Roles VIEW POST

re: Yes, I meant what you meant, but said "no documentation" to include situations where interviewers would throw you an O'reilly book or pdf for refer...

I am not sure why (HR) people decide to structure interviews that way; I was discussing with other devs recently and it makes no sense at all: ok, if you don't know what's the event loop, you can't explain how promises work or the like, then it tells me that you are not a great JS dev. But when I interviewed candidates I never expected them to quote MDN verbatim, much less I would care to see their merely mnemonically acquired knowledge of APIs or CSS properties.

Not sure about which user case you are referring to, but I doubt a for loop can outperform a .forEach(), as you need to declare a variable to iterate through it in the same way. Maybe some engine has some strong optimization, but I would guess that it is because the latter works only for array, which would imply that you first would have to turn the string into an array of characters (which technically was already how is more or less represented at a lower level, but I digress: still computationally expensive!), store the extra value at the cost of extra space and then loop though it with our beloved .forEach() (again, a .map() would be more convenient most of the time and we all love the idea of going functional whenever it is possible, don't we?).

Let me suggest you a small exercise to flex your functional muscles, then: might you replicate the behaviour of map() and .filter() using only the .reduce() method? And could you do so in order to be even more performing?

At the risk of looking (even more) rude and blunt, I think that is BS: books should be the companion of a practical training, not the other way around. You seem to have a decent grasp of core concepts, but what strikes me is that you apparently lacked practice in this kind of problems. Would you think you would become a great martial artist, ballerina or surgeon just reading books? And while I tend to disagree also with the fad of classifying/labelling people in things like "visual learner", assuming that actually works for you, go on YT, watch some video like the one from hacker-rank which in less than 10 mins can visually show how a quick sort or a BFS or an A* or whatever other algo works. But only after you hit the nose against the hard wall of a problem you cannot solve. Yet.

CodeWars is free to you (the pay option is to support the devs in exchange for a few extra stats and info on your profile); the "clan" term is just to follow the ninja/samurai gimmick of the site, same as ranking the katas by belts.

god, let me read! I like it! 🤣

I think even before I solve problems I ought to understand what needs to be solved 🤷🏻‍♀️

The background knowledge is like a toolkit, you don’t know what you can use if you don’t know even know about it. I have a feeling you’re overestimating the amount of “core” I know since the first time I heard of sorting algo or binary tree or o(n) was in interviews.

I agree I lack practice. I just got my adhd under control so it’s been wonderful for learning and doing. Back when I didn’t, I could never read top to bottom let alone hold onto thoughts.

Feel free to read, but in due time you need to build automatism like a professional athlete or chess-player.

I don't think I am over-estimating much, I see you have plenty of shortcomings (this discussion came from one of them, didn't it?), but I also see that you have a good understanding of a lot of stuff and that you practiced with commitment.

That is more than enough in my book, so I would still recommend to practice more as a first step; the drive to read and do more comes better after you see implementations of such a knowledge.

code of conduct - report abuse