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

142
Views
Decrementar bucle en javascript

Estoy tratando de ejecutar este ciclo

 var max_number= $("input[name='max_number']").val(); var min_number= $("input[name='min_number']").val(); for(var j=max_number;j>=min_number;j--) { console.log('j value' + j); }

max_number is 10 y min_number is 8 , entonces for loop no se ejecuta cuando lo cambio a j=max_number-1

 for(var j=max_number-1;j>=min_number;j--) { console.log('j value' + j); }

pero quiero empezar con max_number

quiero que ese bucle se ejecute así:

si max_number es 12 y min number es 2 Salida:

12 11 10 9 8 7 6 5 4 3 2

Alguna solución, gracias

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!