Two Sum Algorithm Javascript Foreach With Async