JavaScript Coding Challenge/Interview Question: All Else Equal

Pubblicato il: 08 marzo 2020
sul canale di: Daily Coding Challenges
25
1

/*
Write a function all_else_equal that takes in an array of numbers. The method
should return the element of the array that is equal to half of the sum of all
elements of the array. If there is no such element, the function should return null.
*/


console.log(allElseEqual([2, 4, 3, 10, 1]));
console.log(allElseEqual([6, 3, 5, -9, 1]));
console.log(allElseEqual([1, 2, 3, 4]));


In questa pagina del sito puoi guardare il video online JavaScript Coding Challenge/Interview Question: All Else Equal della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Daily Coding Challenges 08 marzo 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 25 volte e gli è piaciuto 1 spettatori. Buona visione!