Thursday, June 19, 2025
Latest:
  • German Pronouns with Nominative, Accusative, and Dative cases
  • German articles for the nominative, accusative, and dative cases
  • Der kleine Vogel und die Sonne
  • German alphabet pronunciation
  • Command design pattern
Upokary

Upokary

Quality information

  • Health
  • Life
  • Fashion
  • Food
  • Code
  • English
  • বাংলা
Technology 

Find if the sum of two integers is equal to the given value

Published: February 10, 2022
   const verifySum = (arr, total) => {
       for(let i = 0; i < arr.length ; i++ ){
           for(let j = 0 ; j < arr.length; j++) {
               if (i === j) {
                   continue;
               }

               if(total === arr[i] + arr[j]) {
                   return true;
               }
           }
       }
       return false;
   }

   const input = [5, 7, 1, 2, 8, 4, 3];
   console.log(verifySum(input, 15));

You May Also Like

error Command failed with exit code 127

March 24, 2019 beroza

JenkinsX useful commands that developers should know.

May 5, 2020 beroza

301 Redirect vs Canonical – which one to use?

September 23, 2020 beroza

What are log4j logging hierarchical order in Java?

November 19, 2019 beroza

Learn Kubernetes basics.

May 3, 2020 beroza

Depth first search (DFS)

January 14, 2024 beroza

Should we write a lot of code inside finally block?

June 22, 2023 beroza

Why LinkedList is important?

December 25, 2022 beroza

How to get radio button value using JavaScript?

July 16, 2019 beroza

Why Upokary?

Upokary.com is a useful application in everyday life. It provides very handy information regarding every aspect of life. Each and every tip of upokary.com is meant to make life better.

Upokary tools

  • Youtube thumbnail
  • Youtube video downloader

Useful Links

  • Handy code
  • Technology
  • People
  • Programming
  • Quote
  • Travel
  • WordPress
  • IELTS
  • Kids

Languages

  • EnglishEnglish
  • বাংলাবাংলা

Pages

  • Sitemap
  • Privacy policy
  • About us
  • Contact us

Support

For any kind of query or question please drop a message in the following email: upokary@gmail.com
Copyright © 2025 Upokary. All rights reserved.