Last active
January 4, 2022 20:06
-
-
Save ayeshLK/1fa7135c5d6840c325b683fbeb3a1a7a to your computer and use it in GitHub Desktop.
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 sum(int[] values) returns int { | |
int sum = 0; | |
// each iteration returns a value in the `array` | |
foreach int value in values { | |
sum += value; | |
} | |
return sum; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment