1

Как мне записывать новое значение переменной oB? Чтобы каждую секунду оно обновлялось

function opacityApp(){
    let oB = 0;
    let newInt = setInterval(opacityButton, 1000);
    function opacityButton(){
        if(oB == 1){
            clearInterval(newInt);
        } else {
            oB + 0.1;
            console.log(oB);
            buttonApp[0].style.opacity = oB;
        }
    }
};

1

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Посмотрите другие вопросы с метками или задайте свой вопрос.