Then they should apply for a job where their skills are relevant. If you're applying for a job where you're writing code (like all of the ones I described), you'd better be able to code.
Edit: and we let you Google whatever you need in the interview. If you can't figure out how to clone an array (an implementation detail of the interview question) on your own, I don't know what role you think you're applying for.