JavaScript Taskbook Level 8.7

Задание 1

Given a word, mix the letters of this word in random order.

Задание 2

Given an input, a button and a list ul. A number is entered into the input. Clicking on the button displays a list of all possible variants of decomposing the number into two factors.

Задание 3

The page has divs that can overlap each other using absolute positioning. Click on any div to make it appear on top of the others.

Задание 4

Display the following pyramid on the screen:

999999999
88888888
7777777
666666
55555
4444
333
22
1
Задание 5

Given a list of events for specific dates, stored in the following structure:

javascriptlet events = {
  '2019-12-29': ['name1', 'name3', 'name5', 'name7'],
  '2019-12-30': ['name4', 'name8', 'name9'],
  '2019-12-31': ['name2', 'name6'],
}

Write code that will remake the data structure into this:

javascriptlet events = [
  {
    date:  '2019-12-29'
    event: 'name1'
  },
  {
    date:  '2019-12-31'
    event: 'name2'
  },
  {
    date:  '2019-12-29'
    event: 'name3'
  },
  {
    date:  '2019-12-30'
    event: 'name4'
  },
  {
    date:  '2019-12-29'
    event: 'name5'
  },
  {
    date:  '2019-12-31'
    event: 'name6'
  },
  {
    date:  '2019-12-29'
    event: 'name7'
  },
  {
    date:  '2019-12-30'
    event: 'name8'
  },
  {
    date:  '2019-12-30'
    event: 'name9'
  },
]