2 ms·
There're shocking number of people who can't write simplest code. Here's simple task that I ask on interviews: write JavaScript function which works like setTi
by vbezhenar 4y ago
There're shocking number of people who can't write simplest code.
Here's simple task that I ask on interviews: write JavaScript function which works like setTimeout and uses setTimeout internally but provides a Promise result so it can be awaited. Very few people can write that kind of code. They actually have no idea what Promise is. They want to get in frontend position. How can you write frontend code if you have no idea what Promise is.
- andrewflnr 4y agoI would say that's not a great example. I wrote literally that function as a utility in my project, and it was honestly kind of tricky. There's a big gap between knowing how to use a Promise, which is necessary and closer to an "idea what a Promise is", vs how to build one from scratch, which is nice but probably not necessary for a generic frontend job. It wasn't even really necessary for me, I just wanted to be able to pause functions with an await statement.