Created
October 26, 2016 13:45
-
-
Save yvan-sraka/ab76509ca59a170ed3ef18597387f59d to your computer and use it in GitHub Desktop.
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
// JS | |
function max(tab) { | |
var result = 0; | |
for (var i = 0; i < tab.length; i++) { | |
if (tab[i] > result) { | |
result = tab[i]; | |
} | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment