Pergunta de entrevista da empresa Servify

They asked SQL, Javascript and logic questions. The SQL questions were basic 'what does this statement do?'. The Javascript was two functions and he asked me which function would execute first. The logic question required me to do two for-loops and something else at the end which I wasn't able to figure out.