function sort(type, order) { const tbody = document.querySelector('#jsList') let idx = 0 if (type === 'price') { idx = 1 } else if (type === 'sales') { idx = 2 } const asc = function (a, b) { return a.children[idx].innerHTML - b.children[idx].innerHTML } const desc = function (a, b) { return b.child...