Closed frankcollins3 closed 1 year ago
first proposed approach:
let bucket = [];
I already populated initial variable declaration like so: let bucket = ['test', 'anothertest']
loop.forEach( (data) => bucket.push(data)
'test' and 'another test' are retrievable by bracket notation and are returned together at the index of [0] bucket[1] becomes the span of API data
but without any of those endpoints being returnable.
[11:41pm]
produces this output:
(2) ['test', 'othertest'] 0 : "test" 1 : "othertest"
{name: 'bulbasaur', poke_id: 1, type: 'grass', moves: 'razor-wind', abilities: 'overgrow', …} {name: 'ivysaur', poke_id: 2, type: 'grass', moves: 'swords-dance', abilities: 'overgrow', …} {name: 'venusaur', poke_id: 3, type: 'grass', moves: 'swords-dance', abilities: 'overgrow', …} {name: 'charmeleon', poke_id: 5, type: 'fire', moves: 'mega-punch', abilities: 'blaze', {name: 'charmander', poke_id: 4, type: 'fire', moves: 'mega-punch', abilities: 'blaze', … {name: 'charizard', poke_id: 6, type: 'fire', moves: 'mega-punch', abilities: 'blaze', …} {name: 'squirtle', poke_id: 7, type: 'water', moves: 'mega-punch', abilities: 'torrent', …}