Skip to content

mate-academy/js_sort_table_DOM

Repository files navigation

  1. Replace <your_account> with your Github username in the link
  2. Follow this instructions
    • Run npm run test command to test your code;
    • Run npm run test:only -- -n to run fast test ignoring linter;
    • Run npm run test:only -- -l to run fast test with additional info in console ignoring linter.

Task: Sort of employees table

Hi! In previous tasks, you already implemented table sort by salary. Today task is the same but with using browser events.

Your task: Implement table sorting in ASC order, by clicking on table headers.

As always, all the necessary styles have already been written for you, you do not need to change the layout or styles in this task.

Start table:

Preview

Implement table sorting by clicking on the title
  • Clicking on one of the table headers should sort the table rows in ASC order.