Pregunta de entrevista de Spinny

How DOM works? What are scope in JS?