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

184
Views
el DOM no funciona conmigo cuando pruebo min y max y muestra NaN

cuando lo ejecuto me dio un NaN y lo he intentado muchas veces. aquí está el archivo javascript y el archivo HTML

archivo javascript:

 function MinButton(){ var td1Text = document.getElementById("td1").textContent; // Get array of numbers from text var OriginalArray = td1Text.split(",").map(function(num){ return parseInt(num,10); }); // Get td2 var Min = document.getElementById("MinTable"); // Set td2 to sorted array converted to string Min.textContent = parseInt(Math.min(OriginalArray)); }

archivo HTML:

 <tr> <th>Original array</th> <!--<td><input type="text" id="textO" size="40"></td>--> <td id ="td1">1,5,7,-1,3</td> </tr> <tr> <th>Sorted Array</th> <td id="td2"></td> </tr> <input type="button" value="Find Min" id="Min" onclick="MinButton();">
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!