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
Crear una tabla dada la cantidad de filas y columnas del usuario

Estoy aprendiendo JavaScript en este momento, me dieron la tarea de hacer una tabla con la cantidad de filas y columnas proporcionadas por el usuario.

Traté de hacerlo usando for loop pero aparentemente solo estoy haciendo un bucle infinito, ni siquiera sé por qué es un bucle infinito

 function createTable(){ let table = document.getElementById("myTable") let rows = window.prompt("Numbers of rows :") let columns = window.prompt("Numbers of columns :") for(let i = 1 ; i = parseInt(rows) ; i++){ let myrow = document.createElement("tr") for(let ii = 1 ; ii = parseInt(columns) ; ii++){ let mycol = document.createElement("td") mycol.textContent = "cell" myrow.innerHTML = mycol } table.append(myrow) } }
 <table id="myTable" border="1"> </table> <form> <input type="button" onclick="createTable()" value="Create the table"> </form>

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!