There are two types of interviews, from whatever I've seen - design interviews and algorithmic interviews. In the former, you're just brainstorming, suggesting ideas and working through a usually tough problem.
The second type of interview is the algorithmic interview. While most people would just be looking for pseudo code here, it's not uncommon to be asked write code that'll actually work. Now, when you're in an interview, you are obviously going to use a language that's familiar to you. You just need to the basic syntax, IMHO.
For instance, I've been working with NodeJS for two years now, but if someone asks me to read from STDIN at this very moment, I will have to google the syntax for it. No interviewer is going to judge you for that.