Answer:
Hard to read this so im just going to write as I read.
Step-by-step explanation:
// Create array
let hobbies = ["string 1", "string 2", "string 3"];
// Pop an alert for each hobby
for (let i = 0; i < hobbies.length; i++) {
window.alert(hobbies[i]);
}
// Or to show all at once
windows.alert(hobbies[0] + "\\" + hobbies[1] + "\\" + hobbies[2]);
// Creating myHobby variable
let myHobby = hobbies[0];
// Changing 'hx' elements innerHTML to the 'myHobby' variable
document.getElementByID("hx").innerHTML = myHobby;
// Changing the 'hz' element to the third index of the 'hobbies' array.
// Array index's start at 0, so 1 2 3 is equal to 0 1 2
document.getElementByID("hz").innerHTML = hobbies[2];
// if you referenced hobbies[2]; it would throw an error saying you are accessing a non-existent index. Not those exact words but something like that, lemme know if you need anymore help. This is for JavaScript BTW and it is not tested so there could be Errors