From the course: JavaScript: Ajax and Fetch

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Challenge: Modify the DOM

Challenge: Modify the DOM - JavaScript Tutorial

From the course: JavaScript: Ajax and Fetch

Start my 1-month free trial

Challenge: Modify the DOM

(techno upbeat music) - It's time for another challenge. Ready to try your hand at adding content to the DOM? To complete this challenge, write code that adds information for the first park in the return data to the DOM. You'll add the full park name as the content of the a element in the special section. You'll add the park url as its href value. Then you'll show the park description as the content of the p element. Update the function call to respond to the DOMContentLoaded event on the Window object. For an extra challenge, update your code to display data for a random park in the results rather than always displaying the first one. This challenge might take you around 20 minutes. If you don't have time for that right now, feel free to come back to it later on. When you're done, join me in the next video and I'll go over how I approached it.

Contents