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

120
Views
¿Cuál es el equivalente del "bucle for" para este "bucle for-of"?

Sé cómo iterar sobre un objeto destruyéndolo en el 'bucle for-of', que considero un método fácil:

 let cafeHours = { thurs: { open: '11:00 am', close: '11:00 pm', }, fri: { open: '10:00 am', close: '11:00 am', }, satur: { open: '8:00 am', close: '11:00 pm', }, }; let hours = Object.entries(cafeHours); for (let [day, {open, close}] of hours) { console.log(`On ${day}day we open at ${open} and close at ${close}`); };

Me preguntaba si puedo iterar sobre este objeto y sus objetos usando un bucle Normal for que contiene 3 declaraciones que son así. (y obtener el resultado anterior)

 for (let i = 0; i<hours.length; i++){ };

Por favor, dime si estoy complicando las cosas, pero a veces tengo mucha curiosidad.

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!