<prompt> Write a JavaScript code to generate a random number between 1 to 10  <response>: javascriptfunction getRandomNumber let randomNumber Math.floorMath.random 10 1; return randomNumber;console.loggetRandomNumber; 