Pergunta da entrevista

Entrevista para Front End Engineer

-São Paulo, São Paulo, São Paulo

Intuit

I have been asked to talk about my last year and anything about my other years. After a few minutes the Indian guy has hushes up to technical questions. It was putted a laptop in front of my with Google Chrome opened on Developer Tools. First of all, I was asked to say would be printed on console.log about a trick Javascript Hoisting test. It was a very trick question. In my opinion, it was a question which shows what exactly what they are looking for. For me, they have been looking for a master ninja of Javascript tricks developer, absolutely no sense. After that, I have been asked for write down a code in a piece of paper to identify in a give string all brackets have been closed in pairs like a HTML tag. Which should return true ou false also, should find bad brackets closed and return false for instante, "AB ] CD [ EF ] GH [ IJ". By the end, I have been asked to describe how to find out a specific ball between eight balls. The question was: You have eight balls all of the same size. 7 of them weigh the same, and one of them weighs slightly more. How can you find the ball that is heavier by using a balance. I should also describe possible outcomes.

Resposta

Resposta da entrevista

1 resposta

0

For the question about Javascript Hoisting the answer is "undefined" and the explanation is: The variable X is declared with any value inside a function and after the console.log it gets a value. It is not the same undefined which is trow trough a erro when a variable has not been declared. The question about brackets, I was unable to answer it. To find to heaviest ball, I said I should split the balls in 3 groups. Group A having 3 balls, Group B having 3 balls and Group C having one ball. Put in the balance Group A and B. If one of these groups goes down, the heaviest ball is there. So, I split this group in other 3 groups following the same proceed before. In this case I was able to find the ball in only 3 steps

Confidencial em

Adicionar respostas ou comentários

Para comentar sobre isso, entre na conta ou cadastre-se.