JavaScript Taskbook Level 6.6

Задание 1

Given an array, an input, a button and a paragraph. A number is entered into the input. By pressing the button, output to the paragraph the array element whose number is entered into the input.

Задание 2

Given a paragraph, a button, and an array of colors, let pressing the button paint the paragraph a random color from the array.

Задание 3

Given a table, a button, and an array of colors, let clicking on any cell paint it a random color from the array of colors.

Задание 4

Given a textarea and a div. Text is entered into the textarea. Make it so that when you press Shift + Enter, this text is added to the div.