text: "use strict";const numberElement=document.querySelector("#number"),buttonElement=document.querySelector(".button"),resultElement=document.querySelector(".result"),counterElement=document.querySelector(".counter");let counter=0;function printCounter(){counterElement.innerHTML=counter}function getRandomNumber(e){return Math.ceil(Math.random()*e)}let randomNumber=getRandomNumber(100);function handleButtonClick(e){e.preventDefault();const n=parseInt(numberElement.value);console.log("Número seleccionado =>",n),resultElement.innerHTML=n===randomNumber?"HAS GANADO, CAMPEONA!":n>randomNumber?"demasiado alto":"demasiado bajo",counter+=1,printCounter()}console.log("Random number =>",randomNumber),buttonElement.addEventListener("click",handleButtonClick),printCounter();