Skip to content

Instantly share code, notes, and snippets.

@AyoAlfonso
Last active June 27, 2017 10:06
Show Gist options
  • Select an option

  • Save AyoAlfonso/aadd20be715cd84718f0a647bbac9ab5 to your computer and use it in GitHub Desktop.

Select an option

Save AyoAlfonso/aadd20be715cd84718f0a647bbac9ab5 to your computer and use it in GitHub Desktop.
Highest Numbers in Simple Array
var maxValue = null;
for (var i = 0; i < myArray.length; i++) {
if (maxValue === null || maxValue < myArray[i]) {
maxValue = myArray[i];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment