Skip to content

Instantly share code, notes, and snippets.

@kuznetsovandrey76
Last active December 18, 2016 12:35
Show Gist options
  • Save kuznetsovandrey76/c29f84407c06580950142bb9371e3a0c to your computer and use it in GitHub Desktop.
Save kuznetsovandrey76/c29f84407c06580950142bb9371e3a0c to your computer and use it in GitHub Desktop.
Find max value in Array
var arr = [1, -2, 3, 0];
var max = Math.max.apply(Math, arr);
console.log(max) // 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment