I'm trying to sort a HTML table using javascript. But I am not sure where to start. I need to sort the table when the user clicks on the header. The sorted content should replace the original content in the table.
<table id="myTable">
  <tr>
    <td>School Name</td>
    <td>Phone number</td>
  </tr>
  <tr>
    <td>abc</td>
    <td>23423424</td>
  </tr>
  <tr>
    <td>xyz</td>
    <td>567653424</td>
  </tr>
  <tr>
    <td>def</td>
    <td>095423424</td>
  </tr>
</table>