Pregunta de entrevista de Scoot Networks

They asked me to write code in JavaScript