angular random number between 1 and 10

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

Also in JavaScript: