why can't i reach any object in this array?

26 Views Asked by At

i tried everything, for, forin forof and map loops, i cannot reach single objects wtih any of them

it seems that this is an array within array:

screenshot of browser console when code is executed

here is my code:

let lista = [];
const result = fetch(
    "https://cors-anywhere.herokuapp.com/https://api.hnb.hr/tecajn-eur/v3"
)
    .then((response) => response.json())
    .then((data) => lista.push(data))
    .catch((error) => console.warn("E, nemere!!!!"));
console.log(lista);
console.log(typeof lista);

i tried to write lista[0] , data[0]

doesnt work

0

There are 0 best solutions below