Things you can do with Arrays

const arrAvg = arr => arr.reduce((a,b) => a + b, 0) / arr.length
// arrAvg([20, 10, 5, 10]) -> 11.25
db.students.update(
   { _id: 1 },
   { $push: { scores: 89 } }
)
var allActionButtons = document.getElementsByClassName("action-buttons");

for (var i = 0; i < allActionButtons.length; i++) {

  allActionButtons[i].addEventListener('click', functionToRunWhenClicked, false);

}

var functionToRunWhenClicked = function {
  // Add some stuff here
}
const arrMin = arr => Math.min(...arr);
// arrMin([20, 10, 5, 10]) -> 5

const arrMax = arr => Math.max(...arr);
// arrMax([20, 10, 5, 10]) -> 20
const arrSum = arr => arr.reduce((a,b) => a + b, 0)
// arrSum([20, 10, 5, 10]) -> 45

Similiar Collections