Pregunta de entrevista de Finastra

how does scope work in javascript