Rizzle interview question

Solve Two sum problem in JavaScript