Created
June 20, 2022 13:15
-
-
Save Mr-emeka/c811140a26e4cf10b41b8446a2c850a3 to your computer and use it in GitHub Desktop.
DSA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function simpleArraySum(ar) { | |
// Write your code here | |
let sum = 0; | |
ar.forEach((a,index)=>{ | |
sum += a; | |
}) | |
return sum | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment