From the course: JavaScript: Enhancing the DOM

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Showing and adding experiences

Showing and adding experiences

- [Instructor] Let's go ahead and continue to work on our app. I want to display all the experiences, be able to sort them, and be able to add an experience. Let's start by showing them. So this requires a few steps. So I have a function, fetch, and load experiences. And in there, I'm just going to call the API for the experiences. Could say fetch, specify the address. If you forgot the address, you can go ahead and check out the server.js in your backend, and there you can see the end points. They're also in the readme, by the way, for your convenience, but it's really good if you can read them from the backends. So, what I'm doing, I'm going to just do a fetch, turn the JSON result into JavaScript objects, and then I go ahead and I'm going to display that data, in a separate function, like this. And let's add some basic error handling as well. Alright, so, here we're going to do a bit more with the DOM. We are going to display the experience list, so what do we need? Well, we need…

Contents