First, your end condition for your for loop is incorrect. You want to stop iterating once the index equals the array length, so you want to continue looping while the index is less than the length.
EDIT: Let's, myself included, try to understand the data structure you're using so we can determine how to access the data you need. You have an outer array containing an inner array of first names, an inner array of last names, and an inner array of years. The first element of each of these arrays corresponds to a single object. So we want to iterate all three inner arrays in parallel, grabbing an element from each at each iteration.
Since each of the three inner arrays contain one field from a single set of objects, each of the arrays should be the same length. Therefore, when we want to iterate over any one of the arrays, we can use any of their lengths to do it. Let's use the first array for simplicity. A nice way to grab the inner arrays out of your outer array would be with a destructuring assignment. In the for loop, we're iterating over all three inner arrays at once, not the outer array.
With constant indexes:
const firstNames = profiler[0];
const lastNames = profiler[1];
const years = profiler[2];
for(let i = 0; i < firstNames.length; i++) {
const forNavn = firstNames[i];
const efterNavn = lastNames[i];
const fodselsAr = years[i];
console.log("Fornavn:", forNavn, "Efternavn:", efterNavn, "Fødsels År:", fodselsAr);
}
With array destructuring:
const [firstNames, lastNames, years] = profiler;
for(let i = 0; i < firstNames.length; i++) {
const forNavn = firstNames[i];
const efterNavn = lastNames[i];
const fodselsAr = years[i];
console.log("Fornavn:", forNavn, "Efternavn:", efterNavn, "Fødsels År:", fodselsAr);
}