src/js/wysiwygCommands/table.js
function makeHeader(col, data) {
  let header = '<thead><tr>';
  let index = 0;

  while (col) {
    header += '<th>';

    if (data) {
      header += data[index];
      index += 1;
    }

    header += '</th>';
    col -= 1;
  }

  header += '</tr></thead>';

  return header;
}
function makeHeader(col, data) {
  let header = '<thead><tr>';
  let index = 0;

  while (col) {
    header += '<th>';

    if (data) {
      header += data[index];
      index += 1;
    }

    header += '</th>';
    col -= 1;
  }

  header += '</tr></thead>';

  return header;
}
function makeHeader ( col , data ) { let header = '<thead><tr>' ; let index = 0 ; while ( col ) { header += '<th>' ; if ( data ) { header += data [ index ] ; index += 1 ; } header += '</th>' ; col -= 1 ; } header += '</tr></thead>' ; return header ; }
makeHeader
make table header html string
@param {number} col column count
@param {string} data cell data
@returns {string} html string
makeHeader make table header html string