function MyFunction1(button)
{
    
    button.style.backgroundColor = 'yellow';

}
function MyFunction2(button) 
{
    button.innerHTML = 'SUCCESS';
}

function MyFunction3(button)
{
    button.style.opacity = '0';
}

function MyFunction4(button) 
{
    var pogasiestatijumi = window.getComputedStyle(button);
    var izvelkamcaurspidigumu = pogasiestatijumi.getPropertyValue('opacity');
  
    if (izvelkamcaurspidigumu === '1') 
        {
            button.style.opacity = '0';
        } 
    else 
        {
            button.style.opacity = '1';
        }
}

function MyFunction5(button)
{
    const color_array = ['yellow', 'grey', 'green', 'black', 'teal'];
    while(true) 
    {
        let rand_color_set = color_array[Math.floor(Math.random() * color_array.length)];
        if(rand_color_set != button.style.backgroundColor)
        {
            button.style.backgroundColor = rand_color_set;
            break
        }
    } 
}

function MyFunction6(button)
{
    var a = 0;
    function increaseNumber()
    {
        button.innerHTML = a;
        a++
        if (a <= 10) 
        {
            setTimeout(increaseNumber, 3000);
        }
    }
    increaseNumber()
}

function MyFunction7(button)
{
    var buttons = document.querySelectorAll('.button1');
    buttons.forEach(function(button) 
    {
        button.style.backgroundColor = '#18D5E1'; 
    });
    document.body.style.backgroundColor = '#000000';
}

function MyFunction8(button) 
{
    var timer = 0;
    function increasetimer() 
    {
        if (button.matches(':hover')) 
        {
            timer++;
            document.getElementById('timerValue').innerText = timer;
            if (timer < 10) {
                setTimeout(increasetimer, 1000);
            } else {
                console.log('Max number reached');
            }
        }
    }
    increasetimer();
}
    
function LeaveHover(button)
{
    document.getElementById('timerValue').innerText = '0';
}

function displayText() 
{
    var inputText = document.getElementById('inputText').value;

    document.getElementById('outputBox').innerText = inputText;
}