Skip to content

Instantly share code, notes, and snippets.

@faridv
Created January 27, 2020 16:40
Show Gist options
  • Save faridv/ac59ad77651cbaba5ab835b0df2138da to your computer and use it in GitHub Desktop.
Save faridv/ac59ad77651cbaba5ab835b0df2138da to your computer and use it in GitHub Desktop.
To find the maximum y value of the objects in array:
// https://stackoverflow.com/a/4020842/893111
Math.max.apply(Math, array.map(o => o.y))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment