function createTable(){
  var body = document.getElementsByTagName('span')[0];
  // var body = document.getElementById('table')[0];
  var tab = document.createElement('table');
  
  var table = document.getElementsByTagName('table')[0];

  for (var row=0; row<params.progress.length; row++){
    var tr = document.createElement('tr');
    for (var col=0; col<params.progress[row].length; col++) {
      var td = document.createElement('td');
      var tn = document.createTextNode(params.progress[row][col]);
      td.appendChild(tn);
      tr.appendChild(td);
    };
    tab.appendChild(tr);
  };

  table.parentNode.removeChild(table);//czyszczenie pierwszego wpisu w tablicy

  body.appendChild(tab);
}
//-----------------------------------ETAP 5 - tworzenie tablic z wynikiem
ETAP 5 - tworzenie tablic z wynikiem
ETAP 5 - tworzenie tablic z wynikiem
function createTable(){
  var body = document.getElementsByTagName('span')[0];
  var tab = document.createElement('table');
  var table = document.getElementsByTagName('table')[0];
  for (var row=0; row<params.progress.length; row++){
    var tr = document.createElement('tr');
    for (var col=0; col<params.progress[row].length; col++) {
      var td = document.createElement('td');
      var tn = document.createTextNode(params.progress[row][col]);
      td.appendChild(tn);
      tr.appendChild(td);
    };
    tab.appendChild(tr);
  };
  table.parentNode.removeChild(table);
  body.appendChild(tab);
}
function createTable ( ) { var body = document . getElementsByTagName ( 'span' ) [ 0 ] ; var tab = document . createElement ( 'table' ) ; var table = document . getElementsByTagName ( 'table' ) [ 0 ] ; for ( var row = 0 ; row < params . progress . length ; row ++ ) { var tr = document . createElement ( 'tr' ) ; for ( var col = 0 ; col < params . progress [ row ] . length ; col ++ ) { var td = document . createElement ( 'td' ) ; var tn = document . createTextNode ( params . progress [ row ] [ col ] ) ; td . appendChild ( tn ) ; tr . appendChild ( td ) ; } ; tab . appendChild ( tr ) ; } ; table . parentNode . removeChild ( table ) ; body . appendChild ( tab ) ; }
ETAP 5 - tworzenie tablic z wynikiem
ETAP 5 - tworzenie tablic z wynikiem
// var body = document.getElementById('table')[0]; //czyszczenie pierwszego wpisu w tablicy