Friday, May 30, 2025
Latest:
  • German articles for the nominative, accusative, and dative cases
  • Der kleine Vogel und die Sonne
  • German alphabet pronunciation
  • Command design pattern
  • German words with gender
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

What are the differences between forward proxy server and reverse proxy server?

January 15, 2019 beroza

Should we commit yarn.lock and package-lock.json files?

July 2, 2020 beroza

Traverse array of objects recursively in JavaScript

February 13, 2022 beroza

What are the differences between Call, Apply and Bind in JavaScript?

August 30, 2021 beroza

What is a consumer group in Kafka?

April 26, 2020 beroza

Write a Program to Merge Two Sorted Lists

May 21, 2023 beroza

How to test logo image in ReactJS application using Enzyme and Jest?

September 26, 2020 beroza

cannot load such file — openssl when try to install gem install rails

May 20, 2020 beroza

Objects are not valid as a React child found: object with keys

May 26, 2020 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.