Update script.js
This commit is contained in:
1 parent
7069614624
commit
346da3f39a
1 file changed
+14
@@ -267,3 +267,17 @@ function updateComparisonTable(algorithm, totalSeekTime, order) {
|
||||
row.cells[1].textContent = totalSeekTime;
|
||||
row.cells[2].textContent = order.join(" → ");
|
||||
}
|
||||
|
||||
function resetComparisonTable() {
|
||||
algorithmHistory = {
|
||||
fcfs: { seekTime: "-", order: [] },
|
||||
sstf: { seekTime: "-", order: [] },
|
||||
scan: { seekTime: "-", order: [] },
|
||||
};
|
||||
|
||||
["fcfs", "sstf", "scan"].forEach((algorithm) => {
|
||||
const row = document.getElementById(`${algorithm}Row`);
|
||||
row.cells[1].textContent = "-";
|
||||
row.cells[2].textContent = "-";
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user