этот js-код используется для создания счетчика, который может увеличивать число один, уменьшать и умножать на 5, и его можно изменить.

‹!DOCTYPE html›
‹html›
‹head>
‹title›Пример счетчика‹/title>
‹/head>
‹body>
‹h1 id="счетчик">

‹button onclick=”incrementCounter()”›Increment‹/button>
‹button onclick=”decrementCounter()”›Decrement‹/button›
‹button onclick=”multiplycounter()”›Умножить ‹ /button>
‹button onclick=”Resetcounter()”›Сброс ‹/button›

‹script>
let counterValue = Prompt(

«введите число»
); // Начальное значение счетчика
document.getElementById(“counter”).innerHTML=counterValue

function ignoreCounter() {
counterValue++;
updateCounter();
}

function decrementCounter() {
counterValue — ;
updateCounter();
}

функция Multiplecounter() {

counterValue *=5;
updateCounter();


}

функция Resetcounter() {

counterValue =0;
updateCounter();


}

function updateCounter() {
const counterElement = document.getElementById(“counter”);
counterElement.textContent = counterValue;
}

‹/скрипт ›

‹/script›
‹/body›
‹/html›