Pregunta de entrevista de Dedalus

Two sums javascript. Can be found on leetcode