JavaScript Taskbook Level 8.2

Задание 1

Text with words is entered into the textarea. After losing focus, make a table, in the first column of which there will be words from the text, in the second column - the number of times this word occurs, and in the third - the percentage of this word in the text.

Задание 2

Given a list ul and a button. By clicking the button, sort the list items in ascending order.

Задание 3

Given an array, the subarrays of which contain numbers:

javascript[
  [1, 2, 3],
  [4, 5, 6],
  [7, 8, 9],
]

Merge the elements of this array into numbers:

javascript[123, 456, 789]
Задание 4

Display the following pyramid on the screen:

xx
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx