JSFiddle - React, Tailwind, and code Playground

by lindychen

JavaScript

function randomIntFromInterval(min, max) { // min and max included 
  return Math.floor(Math.random() * (max - min + 1) + min);
}

var x = randomIntFromInterval(5, 15);
console.log(x);