created array with the ages from the data string.
solved minAge & maxAge
got the average of ages in array
added some comments and return of data for ages
name array sorted and added , with space after. Only swedish letters left
removed for loops and added map function instead
made code somewhat easier to read
added variable for result and a return of the variable