Can you use imports in an interview?

I notice on some the question there is an import in the code

const Deque = require(’./collections/deque’); //

Can you actually use this in an interview, doesnt look right?


It depends on the interviewer you can use a library to implement some functionality or you have to also write a function for that. Moreover we’re looking forward to use functions rather than importing them.