JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="https://cdn.datatables.net/v/dt/jqc-1.12.3/dt-1.10.12/cr-1.3.2/datatables.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdn.datatables.net/v/dt/jqc-1.12.3/dt-1.10.12/cr-1.3.2/datatables.min.js"></script>
<table class="table">
  <thead>
    <tr>
      <th>Column 0</th>
      <th>Column 1</th>
      <th>Column 2</th>
      <th>Column 3</th>
      <th>Column 4</th>
      <th>Column 5</th>
      <th>Column 6</th>
      <th>Column 7</th>
      <th>Column 8</th>
      <th>Column 9</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Cell 0</td>
      <td>Cell 1</td>
      <td>Cell 2</td>
      <td>Cell 3</td>
      <td>Cell 4</td>
      <td>Cell 5</td>
      <td>Cell 6</td>
      <td>Cell 7</td>
      <td>Cell 8</td>
      <td>Cell 9</td>
    </tr>
  </tbody>
</table>
<button class="move-forward">Move First Column to Last</button>
<button class="move-backward">Move Last Column to First</button>

JavaScript

var table = $('.table').DataTable({
  colReorder: true
});

table.on('column-reorder', function() {
  console.log(table.colReorder.order());
});

$('.move-forward').on('click', function() {
  table.colReorder.order([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);
});

$('.move-backward').on('click', function() {
  table.colReorder.order([9, 0, 1, 2, 3, 4, 5, 6, 7, 8]);
});