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

272
Views
El navegador no puede procesar el código, ¿cómo puedo solucionarlo?

He estado tratando de tomar una matriz y usarla para encontrar el área más grande (usando la matriz como altura y la longitud entre las variables de la matriz como ancho), pero cuando intento iniciarla, la página simplemente no se carga, ¿cómo puedo? ¿arreglalo?

 var array = [1, 8, 6, 2, 5, 4, 8, 3, 7];

var alto, ancho, área; var maxArea = 0;

función área más grande () {

 for (i = 0; i < array.length; i++){ for (n = i+1; n = array.length - 2; n++) { if (array[i] > array[n]) { height = array[n]; } else if (array[i] = array[n]) { height = array[n]; } else { height = array[i]; } width = n - i; area = height * width; if (area > maxArea) { maxArea = area; } } } console.log(maxArea);

}

área más grande();

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

0

El problema puede deberse a que accidentalmente asignó n dos veces en lugar de usar la comparación como creo que es lo que realmente quería:

for (n = i+1; n = array.length - 2; n++) {

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!