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

101
Views
Me sigo sin definir. Antes de que se muestre el resultado

 let bigo = [[1,2,3],[4,5,6],[7,8,9]]; for(let i = bigo.length; i >= 0; i--){ console.log(bigo[i]); }

Resultado:

 > undefined > [ 7, 8, 9 ] > [ 4, 5, 6 ] > [ 1, 2, 3 ]

Sigo undefined antes de que se muestre el resultado. Qué estoy haciendo mal.

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

0

El último índice es length - 1 , no length , por lo que su primer resultado estará fuera de los límites y se mostrará undefined .

about 4 years ago · Juan Pablo Isaza Report

0

bigo tiene 3 elementos de largo pero no tiene nada en la posición de índice 3. Esto se debe a que los índices cuentan desde 0. Debe escribir let i = bigo.length - 1

about 4 years ago · Juan Pablo Isaza Report

0

Ahórrese la molestia y deje de usar bucles basados en índices.

 let bigo = [[1,2,3],[4,5,6],[7,8,9]]; for (let arr of [...bigo].reverse()) { console.log(arr); }

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!