Hacker News new | ask | show | jobs
by Timmy_C 5038 days ago
Recently, I was interviewing a front-end developer candidate and I gave them a simple JavaScript problem. The sad thing was, they didn't recognize `document.getElementById()` and didn't know any of the parameters to `addEventListener()`.

We finished the exercise assuming the example used jQuery instead.

3 comments

That's a fair assumption since most of front-end development is done using jQuery as far as the DOM goes.

Did you expect your interviewees to have memorized APIs? There's Google so that you can look up those when needed.

I agree. I think it's important to know Javascript as a language well, but there are very few cases when you'd be using Javascript without some abstraction from the DOM.
And in point of fact, neither of those examples are actually about JS, the language. They're about the DOM.
Not recognising document.getElementId is pretty bad, though. It's perhaps the most basic and commonly used part of the DOM itself.
It's a common problem nowadays I guess. I honestly don't remember the last time I worked on a project with plainjane javascript.

There always is either underscore or backbone or require or dojo or prototype or yui or jquery...

Don't really know if this is good or bad!

maybe I'm mistaken, but I think this is more of "jquery programmer" problem. jQ really abstracts away from the nitty gritty of the dom api and also for any beginner / intermediate frontend guys the source is not very readable. In comparison dojo for example, requires you know what you're doing and also to have pretty extensive knowledge about js, the dom, etc. Also, in my opinion, its source code is very clean in comparison.