Sunday, October 5, 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

Convert an Array Into a 2D Array With Conditions

May 28, 2023 beroza

The following SDK component was not installed: sys-img-x86-addon-google_apis-google-21

December 4, 2018 beroza

Uncaught (in promise) SyntaxError: Unexpected token in JSON at position 0

April 18, 2021 beroza

How to set exact path along with dynamic param using react router?

March 6, 2020 beroza

Consider static factory methods instead of constructors

January 23, 2020 beroza

How to set environment variables on Mac OS and Ubuntu?

July 3, 2020 beroza

Write a Program to Find Min Max Game

May 17, 2023 beroza

What are the differences between properties and attributes in JavaScript?

August 31, 2021 beroza

Parsing error: Expected corresponding JSX closing tag

March 25, 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

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.