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

164
Views
¿Cómo usar loop for in gulp?

Estoy tratando de automatizar la creación de archivos en trago. Hice una tarea de preparación que debería tomar los nombres de las secciones de una matriz y generar archivos con marcado incorporado en el interior:

 function prepare(){ for(let i = 0; i==sections.length-1;i++){ return createFile(`src/parts/_${sections[i]}.html`, ` <div class="${sections[i]}"> <div class="${sections[i]}__content ${sections[i]}__container"></div> </div>\n`, function (err) { // file either already exists or is now created (including non existing directories) }); } }

Pero sale este error: ingrese la descripción de la imagen aquí

Significa la falta de retorno en la función. ¿Cómo ejecutar un bucle for creando archivos y aún usar return?

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!