Skip to content

Instantly share code, notes, and snippets.

@dance2die
Created March 11, 2018 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dance2die/07ef47f94bac0fc2ffa5f2f4b416e95c to your computer and use it in GitHub Desktop.
Save dance2die/07ef47f94bac0fc2ffa5f2f4b416e95c to your computer and use it in GitHub Desktop.
function minMaxDemo(orders) {
const minimumQuantity = Math.min(...orders.map(order => order.quantity));
const maximumQuantity = Math.max(...orders.map(order => order.quantity));
WriteLine(`Minimum Quantity: ${minimumQuantity}`);
WriteLine(`Maximum Quantity: ${maximumQuantity}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment