Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Interviewing a JavaScript engineer (agentcooper.ghost.io)
11 points by adamnemecek on Feb 4, 2014 | hide | past | favorite | 5 comments


Nice read, I had to think about a few of these.

In particular (a == 0) && (a == 1) && (a == 2).

Here's a fun value for a:

    var a = {
      called: -1,
      valueOf: function() {
        this.called += 1;
        return this.called;
      }
    };


Don't you mean:

   var A = function(){
     this.called = -1;
   }
   A.prototype.valueOf = function(){
     this.called += 1;
     Return this.called;
   }
   var a = new A()


I must think out of the box. I'm trying to find a number/string to make true. Nice catch.


A lot of this would fall into the category of "interview puzzles", i.e. they make the interviewer look clever and are utterly useless in helping hire the right person.

http://37signals.com/svn/posts/3543-google-uses-big-data-to-...

> And another one, completely useless in production code, but a nice puzzle to solve

Quite. I would prefer a job where I make production code not crossword puzzles.


Maybe they are hiring people to implement features that are completely useless in production code but are nice to implement?

PS: why do you even need to ask JS developers puzzles - all the most difficult problems are on server-side anyway (unless it is Node.js of course).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: