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

205
Views
Texto de orientación dentro del estado en la matriz

Tengo este script para apuntar al último juego dentro de una matriz.

 const lastMatch = league.data.schedule.events.pop();

Pero eso aparece en el último juego, y entiendo por qué. De hecho, quiero apuntar a los juegos que están 'completados'.

Lo intenté

 const lastMatch = league.data.schedule.events.state('completed');

pero parece que no puede resolverlo. Imagen de league.data.schedule.events

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede obtener todos los juegos con la propiedad completed mediante el método Array#filter .

 const completed = games.filter(({ state }) => state === "completed")

Esto devolverá una nueva matriz con los elementos que cumplen la condición especificada.

about 4 years ago · Juan Pablo Isaza Report
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!