im kinda new to javascript. using this function (which was my answer to a previous question in the assignment) i am supposed to load a list of 50 links with the class “collection-item” within an element with the id “listing”. how do i go about this. the teacher doesnt explain very well.
the previous question was to make an HTTP request for a collection of pokemon data using https://pokeapi.co/api/v2/pokemon/?limit=50&offset=50.
async function getPokemon(url){
try{
let response = await fetch(url);
let result = await response.json();
getListing(result);
}catch(e){
console.log(e);
}
}
getPokemon("https://pokeapi.co/api/v2/pokemon/?limit=50&offset=50")