These 2 expressions do the same thing but which one is safer or even more efficient?
var indexedCellValue = selectedCell.srcElement.parentElement.cells[index].innerText;
var indexedCellValue = $(selectedCell.srcElement).parent('tr').get(0).cells[index].innerText;
(Both a getting a cell’s, selectedCell, parent row and indexing into a column on that parent row.)
Pure JavaScript is gonna be always faster than jQuery, but with jQuery you ensure that the code is going to work in most of the browsers.