The Math.random() JavaScript method returns a floating-point random number between 0 (inclusive) and 1 (not included).
This method can be used to generate random integer numbers in JavaScript.
Bellow there are 3 functions with examples to generate random integer numbers with various criterias.

1. The `randomNr()` function from the following example returns a random integer between a minimum and maximum number.
```<script>
//Returns a random integer between min (inclusive) and max (inclusive)
function randomNr(min, max){
return Math.floor(Math.random() * (max - min + 1)) + min;
}

//Test
var nr_al = randomNr(1, 9999);
</script>
```

2. The `randNrDigits()` function presented in the following example returns a random integer with a specified number of digits.
```<script>
//Returns a random integer with a specified number of digits (nd)
function randNrDigits(nd){
var n0 =1;
for(var i=1; i<nd; i++) n0 +='0';
return Math.floor((1*n0) + Math.random() * (9*n0));
}

//Test
var nr_al = randNrDigits(4);
</script>
```

3. The `randNrUniqueDigits()` function from the following example returns a random integer with a specified number of digits, and the digits do not repeat.
```<script>
//Returns a random integer with digits that not repeat, with specified number of digits (nd)
function randNrUniqueDigits(nd){
var ar_nr =[0,1,2,3,4,5,6,7,8,9];
for(let i = ar_nr.length -1; i >0; i--){
let j = Math.floor(Math.random() * (i + 1));
[ar_nr[i], ar_nr[j]] = [ar_nr[j], ar_nr[i]];
}

return ar_nr.splice(1, nd).join('')*1;
}

//Test
var nr_al = randNrUniqueDigits(4);
</script>
```

#### Daily Test with Code Example

##### PHP-MySQL
Which tag adds a new line into a paragraph?
<b> <br> <p>
```First line ...<br>
Other line...```
Which CSS property can be used to add space between letters?
text-size word-spacing letter-spacing
```#id {
letter-spacing: 2px;
}```
What JavaScript function can be used to get access to HTML element with a specified ID?
getElementById() getElementsByTagName() createElement()
```var elm = document.getElementById("theID");
var content = elm.innerHTML;
Click on the "echo" correct instruction.
echo "CoursesWeb.net" echo "CoursesWeb.net"; echo ""CoursesWeb.net";
`echo "Address URL: http://CoursesWeb.net";`
Generate random numbers in JavaScript

#### Last accessed pages

1. Tractors Power (469)
2. Penalty Fever (1649)
3. Bloons Tower Defense 5 (1802)
4. Theme Hotel (1629)
5. The Rise Of Atlantis (11906)

#### Popular pages this month

1. Qwop (4071)
2. Flash Games - Free online Games (2086)
3. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (1836)
4. Get Attribute (ID, Class, Name, Title, Src) with jQuery (1792)
5. Drag Racer V3 (1763)