How to write some Google Apps Script code for increasing the number of rows of every table from 20 to 40 in a Google Docs file easily?

This is the file. It is supposed to be a worksheet.

There are lots of tables in the file. Each table has 20 blank rows (for 20 students). I need 40 blank rows (for 40 students).

Adding the rows manually is a menially repetitive task. I found a relatively easy method. Select the 20 rows using the mouse, and then right click. Then an option comes up asking if I want to add 20 rows below or not, but it is still a cumbersome process to repeat for all the tables. How do I accomplish this task more easily?

I don’t know the JavaScript, but still I stupidly tried the following code:

function myFunction() {      

  for (let table in DocumentApp.getActiveDocument().getTables()) {      

    for (let i = 0; i < 20; i++) {              
      table.insertTableRow(20); 

    }   

  }

}

Gives me the following error:

Error TypeError: table.insertTableRow is not a function