reset datatable in close code example
Example 1: remove previous datatable instance
//Destroy the old Datatable
$('#equictntbl').DataTable().clear().destroy();
Example 2: datatables clear table
const table = $("#yourTable").DataTable();
table.clear().draw(); // make sure to call draw() to see the table empty