JavaScript Taskbook Level 9.8

Задание 1

Given a table and a button. By clicking on the button, swap the first and second rows of the table.

Задание 2

Given a table and a button. By clicking on the button, swap the first and second columns of the table.

Задание 3

Given a table. By clicking on the header of any column, sort the table by the values ​​of the cells in that column.

Задание 4

Given a table. Make it so that when you click on any cell of the table, the numbers 1, 2 and 3 are inserted into it in turn.