Created
July 5, 2012 07:53
-
-
Save tsyber1an/3052150 to your computer and use it in GitHub Desktop.
sum of elems in array
This file contains hidden or 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
total = 0 | |
$.each arr, -> | |
total += this | |
total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment