---
title: "Discussion on \"JavaScript: Two sum problem\" | Hashnode"
description: "Discussion on \"JavaScript: Two sum problem\". let startTime, endTime\nlet integerArr = [1, 2, 8, 4, 5, 18];\nlet targetNum = 19;\nfunction twoSumMethod1 (integerArr, targetNum) {\n  let condition = false;\n  for (let i = 0; i < integerArr.length; i++) {\n    for (let j = 0; j < integerArr.length; j++)..."
url: "https://hashnode.com/posts/javascript-two-sum-problem/632be635bdaf1cf2f4483c73"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JavaScript: Two sum problem](https://harikrishna.hashnode.dev/javascript-two-sum-problem?utm_source=hashnode&utm_medium=feed)

let startTime, endTime let integerArr = \[1, 2, 8, 4, 5, 18\]; let targetNum = 19; function twoSumMethod1 (integerArr, targetNum) { let condition = false; for (let i = 0; i < integerArr.length; i++) { for (let j = 0; j < integerArr.length; j++)...

Jan 19, 2022 · 1 min read · harikrishna.hashnode.dev  
Read the article

-   [#twosum](https://hashnode.com/tag/twosum)

## Written by

[Hari Krishna Anem](https://hashnode.com/@hkrishna)

@hkrishna · Hyderabad, India

  
[View profile](https://hashnode.com/@hkrishna)

Full stack developer

Full stack developer (ReactJS, NodeJS, JavaScript, PHP, SQL)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
