There are a lot of good interview questions (even "puzzles") for software developers here in Stack Overflow and other places, but I was wondering if anyone had some good questions for a front-end developer position. We're looking for someone who knows HTML+CSS+JS.
Some of the obvious questions:
Do you know any good "puzzles" for a front-end developer? Maybe a JS fizz-buzz?
edit: changed the two questions to be a bit more open.
It depends on the level you are interviewing for. I recently finished up a good round of interviews for frontend positions (and found a good job! ;), here are some of the questions I was asked which I thought stood out (and were more challenging than others).
Explain the difference between the JavaScript call
and apply
functions.
Puzzle: Emulate the game "Secret Santa" where there are 3 or more participants, no participant can receive their own gift or receive more than one gift. Do this in JavaScript.
Identify two ways in which you can clear a floated element with HTML/CSS.
What is the difference between event bubbling and event capture?
Describe a rendering problem you had in IE6 or IE7, and how you overcame it.
Define the term 'closure' and give an example of it in JavaScript.
Explain the differences between the IE and DOM standard event model.
What is the proper way to evaluate JSON from the server, and why is this the proper way?