Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
hice un mapa con fetch y dividí el resultado, y empujé a otra variable, pero cuando intento acceder, devuelve indefinido - matriz [0] = indefinido

hice un mapa con fetch y dividí el resultado, y empujé a otra variable, pero cuando intento acceder, da indefinido

 const arrayPokemons = Array(5) .fill() .map((item, index) => { let hold = []; fetch(`https://pokeapi.co/api/v2/pokemon/${index + 1}`) .then((res) => res.json()) .then((data) => { hold.push(data.name.split("")); }); console.log(hold, " INTO THE MAP"); return hold; }); console.log(arrayPokemons, "ALL ARRAYS"); console.log(arrayPokemons[0], "SPECIFC ARRAY"); console.log(arrayPokemons[0][0], "SELECTED ARRAY, BUT RETURN undefined");

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!