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.
splitmethod splits a string into substrings using a separator string. The substrings are returned as an array. The original string is not changed.
Here, the separator string is the hyphen. It splits the date string into three parts. These three parts are assigned as an array to the variable
let date = '31-10-2017'; let parts = date.split('-'); let day = parts; // '31' let month = parts; // '10' let year = parts; // '2017'
parts. Afterwards, the individual parts are assigned to separate variables.
addthat takes a string with a summation task and returns its result as a number. A finite number of natural numbers should be added. The summation task is a string of the form '1+19+...+281'.