Question: Use your code editor ( Such as: Notepad or the Text Editor within the Hands - on - Practices ) to open the project 0
Use your code editor Such as: Notepad or the Text Editor within the "HandsonPractices to open the projecttxthtml and projecttxtjs files from the js project folder. Enter your name and the date in the comment section of each file and save them as projecthtml and projectjs respectively.
Go to the projecthtml file in your code editor and in the head section add a script element to load the projectjs file, deferring the loading of the JavaScript source file until the entire HTML file is loaded. Study the contents of the HTML file and save your changes.
Go to the projectjs file in your code editor. Below the code that creates and populates the captions array, declare the htmlCode variable, setting its initial value to an empty text string.
Create a for loop with a counter that goes from to less the length of the captions array in increments of With each iteration, add the following text to the value of the htmlCode variable:
where i is the value of the counter for that iteration and captionsi is the corresponding element from the captions array.
After the for loop, change the inner HTML of the document element by the id "gallery" to the value of the htmlCode
Save your changes to the file and then load projecthtml in your browser. Verify that the page displays the images in the slide gallery along with their captions.
Please take screenshots of your work.
Please submit your file and screenshots for grading.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
