Javascript control structures and function
<p><strong>I dont need you to write the code, i just need some help as to how to complete each piece of the program as I am very lost and dont really know where to start</strong></p>

<p>Every 1000 years, three unexceptional human beings are give the opportunity by our Xel Naga creators to visit different times in our history. At the end of their journeys, it is your responsibility as the Namekeeper to give the time travelers titles that summarize their experiences through time. Each time traveler visits 5 eras. Titles for each era are below:</p>

<pre><code>Revolutionary: 1970 - 1979
Indulgent: 1980-1989
Enlightened: 1990-1999
Transparent: 2000 - 2009
Mad: 2010-today
</code></pre>

<p>Each traveler's title is based on the last place he/she visited. For example: If the last place TimeTraveler#1 visited was 1987, his title would be "Indulgent"</p>

<p>Create 3 time traveler objects. Each time traveler object has 2 properties: "eras" and "lastEra"</p>

<pre><code>timeTraveler.eras: An array containing the 5 years that the traveler visited. (The time machine randomly generates the years) and
timeTraveler.lastEra: A function that returns the title of the era he last visited. This function accepts the array above and returns a string. You may create a standalone named function then assign that function to the "lastEra" property name and finally, execute the function using the "lastEra" property.
Use console.log() to output the last era that each traveler visited.
If all three time travelers' last eras are the same, output "The Mayan Prophecy was real".
Here's a hint on how to program the Time Machine: Use Math.random to generate a random Number. Use that random number to find a random millisecond between today and Jan 01 1970 (Research the way the Date object works). Find the year in which that random date existed. Find the decade in which that year existed. Do that 5 times to find 5 different dates.
Now that you have the decades that the time traveler visited, return the title of the last visited era.
</code></pre>

<p>I dont need you to write the code, i just need some help as to how to complete each piece of the program as I am very lost and dont really know where to start</p>
