datatables clear table

JavaScript
const table = $("#yourTable").DataTable();

table.clear();
Source

Also in JavaScript: