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

192
Views
Rechazo no controlado (TypeError): no se pueden leer las propiedades de undefined (leyendo 'forEach'

aquí hay un error de este tipo Rechazo no controlado (TypeError): No se pueden leer las propiedades de undefined (leyendo 'forEach') (función anónima) http://localhost:3000/portfolio/arbitunity/static/js/main.chunk.js:3059: 30 3056 | 3057 | dataset.forEach(exchange => { 3058 | // luego itera sobre cada moneda

3059 | exchange.pairs.formatted.forEach(coin => { | ^ 3060 | // mapear monedas ya procesadas (uniqueCoinsAndPrices) 3061 | // comprobar si la entrada de dicha moneda ya existe 3062 | const found = uniqueCoinsAndPrices.some(item => item.name === coin.name); // si no se encuentra, inserte un nuevo objeto (incluido el nombre de la moneda) en la matriz Ver código fuente getUniqueCoinsAndPrices C:/Users/Admin/Desktop/arbitunity-master/src/functions/calculations/ getUniqueCoinsAndPrices.js:5 2 | const uniqueCoinsAndPrices = []; 3 | 4 | // iterar sobre cada intercambio 5 | dataset.forEach((intercambio) => { | ^ 6 | // luego iterar sobre cada moneda 7 | intercambio. pairs.formatted.forEach((moneda) => { 8 | // mapa sobre monedas ya procesadas (monedas únicas y precios)

ingrese la descripción de la imagen aquí

 export const getUniqueCoinsAndPrices = (dataset) => { const uniqueCoinsAndPrices = []; // iterate over every exchange dataset.forEach((exchange) => { // then iterate over every coin exchange.pairs.formatted.forEach((coin) => { // map over already processed coins (uniqueCoinsAndPrices) // check if entry of said coin already exists const found = uniqueCoinsAndPrices.some( (item) => item.name === coin.name ); // if not found, push a new object (inluding coin name) to array if (!found) { uniqueCoinsAndPrices.push({ name: coin.name, id: coin.id, priceList: [ { exchange: `${exchange.name}`, price: coin.price, }, ], }); } // if found -> check at which index, // update only the price (add price @ ExchangeXYZ to list) // (useless on the first exchange, but needed for comparing data of multiple ones) else { const index = uniqueCoinsAndPrices .map((element) => element.name) .indexOf(coin.name); uniqueCoinsAndPrices[index].priceList.push({ exchange: `${exchange.name}`, price: coin.price, }); } }); }); return uniqueCoinsAndPrices; };

ingrese la descripción de la imagen aquí

ingrese la descripción de la imagen aquí

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!