The browser storage localStorage is not available. Either your browser does not support it or you have disabled it or the maximum memory size is exceeded. Without localStorage your solutions will not be stored.

Loops and arrays

for loops are handy for traversing arrays. In the following example, the elements of an array are added together:
var sum = 0;
for (var i = 0; i < myArray.length; i++) {
  sum = sum + myArray[i];
}

Exercise

Write a function mean that accepts an array filled with numbers and returns the arithmetic mean of those numbers. mean([1, 2, 3]) should return (1+2+3)/3 = 2.