Handlers for different events in JavaScript

In addition to clicking on an element, there are other events. For example, using the dblclick event, you can catch a double click on an element, using the mouseover event - hovering over the element, and using the mouseout event - leaving the cursor from the element.

At the same time, handlers of various types of events can be attached to one element. Let's, for example, bind a cursor hover response and a leave response to the same element:

javascriptbutton.addEventListener('mouseover', function() {
  console.log('1');
});
button.addEventListener('mouseout', function() {
  console.log('2');
});
Задание 1

Given a button. By double-clicking on it, display some message.

Задание 2

Given a button. Display a message by hovering over it.

Задание 3

Given a button. When the cursor leaves it, display some message.

Задание 4

Given a button. Display one message when you hover over it, and another message when you leave it.