assets/js/function.js
/**
 * Update UI to incorporate new changes(Add/Delete rows and columns, sorting)
 */
Update UI to incorporate new changes(Add/Delete rows and columns, sorting)
Update UI to incorporate new changes ( Add / Delete rows and columns sorting )
function updateUI() {
  const allCells = document.querySelectorAll(
    '.row-parent span[contentEditable="true"]'
  );
  allCells.forEach((cell) => {
    const row = cell.dataset.row;
    const col = cell.dataset.col;
    cell.textContent = spreadSheet[row][col];
  });
}
function updateUI ( ) { const allCells = document . querySelectorAll ( '.row-parent span[contentEditable="true"]' ) ; allCells . forEach ( ( cell ) => { const row = cell . dataset . row ; const col = cell . dataset . col ; cell . textContent = spreadSheet [ row ] [ col ] ; } ) ; }
Update UI to incorporate new changes(Add/Delete rows and columns, sorting)
Update UI to incorporate new changes ( Add / Delete rows and columns sorting )
// console.log(spreadSheet);