JavaScript Taskbook Level 10.6

Задание 1

Given an input. Make it so that when you type the word 'blur' into it, this input loses focus.

Задание 2

Given a table. Take turns to put all the Tetris figures into it so that the beginning of the figure is in the center of the table.

Задание 3

Modify the previous task so that there are buttons next to the table that can be used to rotate the shapes.

Задание 4

Make a script that generates quadratic equations with integer roots.

Задание 5

Given a textarea. It contains text. The user selects several lines of text and presses the Tab key. Make it so that a tab is inserted at the beginning of each selected line.

Задание 6

Given a string containing any number of nested paired parentheses, write code that will check that the parentheses are positioned correctly.

This is correct:

javascript'()()'

This is correct:

javascript'(())'

This is incorrect, since the number of open brackets does not match the number of closed ones:

javascript'())'

This is incorrect, because although the number of open brackets matches the number of closed ones, they are in the wrong order:

javascript'))(('