Snippets Collections
const arrAvg = arr => arr.reduce((a,b) => a + b, 0) / arr.length
// arrAvg([20, 10, 5, 10]) -> 11.25
const arrSum = arr => arr.reduce((a,b) => a + b, 0)
// arrSum([20, 10, 5, 10]) -> 45
const arrMax = arr => Math.max(...arr);
// arrMax([20, 10, 5, 10]) -> 20
const arrMin = arr => Math.min(...arr);
// arrMin([20, 10, 5, 10]) -> 5

bookmark
dashboard

Mon Mar 23 2020 07:13:49 GMT+0000 (UTC) https://www.30secondsofcode.org/python/s/max-by/

#python #python #math #list
bookmark
dashboard

Sun Jan 05 2020 19:39:47 GMT+0000 (UTC) https://codeburst.io/javascript-arrays-finding-the-minimum-maximum-sum-average-values-f02f1b0ce332

#javascript #webdev #arrays #math
bookmark
dashboard

Sun Jan 05 2020 19:37:35 GMT+0000 (UTC) https://codeburst.io/javascript-arrays-finding-the-minimum-maximum-sum-average-values-f02f1b0ce332

#javascript #webdev #arrays #math
bookmark
dashboard

Sun Jan 05 2020 19:35:54 GMT+0000 (UTC) https://codeburst.io/javascript-arrays-finding-the-minimum-maximum-sum-average-values-f02f1b0ce332

#javascript #webdev #javascript #arrays #math
bookmark
dashboard

Sun Jan 05 2020 19:31:48 GMT+0000 (UTC) https://codeburst.io/javascript-arrays-finding-the-minimum-maximum-sum-average-values-f02f1b0ce332

#javascript #webdev #arrays #math

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension