3 ms·
Interesting that you use Google as the example for always using semi-colons with JavaScript. When writing a code-example on a white-board during my Google inte
by uptown 16y ago
Interesting that you use Google as the example for always using semi-colons with JavaScript. When writing a code-example on a white-board during my Google interview, I was using semi-colons throughout my code. One of the things the interviewer asked was why I was using semi-colons ... implying that my code wasn't as clean as it could be. We talked about whether they were needed or not, but his preference seemed to be that they weren't really necessary, and that I shouldn't have been including them in my code.
I continue to use them in my code.
- yock 16y agoPerhaps your interviewer asked the question to see if you could justify them, thus gauging your understanding of how the language is parsed at runtime. The fact that the conversation continued may indicate that he or she wasn't convinced by your answer?
- dazzawazza 16y agoI think this is more likely. When interviewing the point is to find out how someone is thinking not if they agree with a coding standard.
- uptown 16y agoQuite possible. It wasn't a turning-point in the interview or anything ... but a discussion that lasted longer than I would have expected given the topic.
- mrfish 16y agoDid you get the job?