Two Sum Algorithm Javascript Array Contains