assets/js/function.js
/**
 * Insert a row above/below a specified row
 *
 * @param {Boolean} top Checks weather row needs to be added on top of the specified row.
 */
Insert a row above/below a specified row
@param {Boolean} top Checks weather row needs to be added on top of the specified row.
Insert a row above / below a specified row @param { Boolean } top Checks weather row needs to be added on top of the specified row .
function insertRow(top = false) {
  const insertIndex = top
    ? currentRowHeaderIndex
    : Number(currentRowHeaderIndex) + 1;
  const newRow = createRow(rowSize);
  app.appendChild(newRow);
  rowSize++;
  spreadSheet.splice(insertIndex, 0, Array(colSize).fill(""));
  updateUI();
}
function insertRow ( top = false ) { const insertIndex = top ? currentRowHeaderIndex : Number ( currentRowHeaderIndex ) + 1 ; const newRow = createRow ( rowSize ) ; app . appendChild ( newRow ) ; rowSize ++ ; spreadSheet . splice ( insertIndex , 0 , Array ( colSize ) . fill ( "" ) ) ; updateUI ( ) ; }
Insert a row above/below a specified row
 @param {Boolean} top Checks weather row needs to be added on top of the specified row.
Insert a row above / below a specified row @param { Boolean } top Checks weather row needs to be added on top of the specified row .
// console.log("insertRowIndex ", insertIndex);