function delCol() {
    var table = document.getElementById('table');
    var length = table.childElementCount;
    var trs = table.childNodes;

    if (table.firstElementChild.childElementCount > 1) {
        for (var i = 0; i < length; i++) {
            trs.item(i).removeChild(trs.item(i).lastElementChild);
        }
    }
}
/**
 * Delete last column from table #table. Delete last cell from every row. Minimal number of columns are 1.
 */
Delete last column from table #table. Delete last cell from every row. Minimal number of columns are 1.
Delete last column from table #table . Delete last cell from every row . Minimal number of columns are 1 .
function delCol() {
    var table = document.getElementById('table');
    var length = table.childElementCount;
    var trs = table.childNodes;
    if (table.firstElementChild.childElementCount > 1) {
        for (var i = 0; i < length; i++) {
            trs.item(i).removeChild(trs.item(i).lastElementChild);
        }
    }
}
function delCol ( ) { var table = document . getElementById ( 'table' ) ; var length = table . childElementCount ; var trs = table . childNodes ; if ( table . firstElementChild . childElementCount > 1 ) { for ( var i = 0 ; i < length ; i ++ ) { trs . item ( i ) . removeChild ( trs . item ( i ) . lastElementChild ) ; } } }
Delete last column from table #table.
Delete last column from table #table .