What is the out put for the following code var x; var y = function() { return { z: 10, x: function () { console.log('x'); } }; } y(); x();
Anónimo
I answered it will be an error, but the guy who took my interview is the most talented and he was claiming it will print the console. Then I said if it's y().x() then it will print the console. he was not compromised and he was telling me to brush up my skills. finally he reject me in the first round because of this question. One small advice to company please have a good techie as well as good attitude guys as panel. I spent my day for the interview and got rejected because lack of knowledge of the panel member. Please take care about this. you may loose so many good techies.