Showing first of all that the randomisation can be done.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Actual Application
This is where we had a range of vendor logos to choose from, but only had room to display a certain subset of them depending on screen size, and of course we didn't want them to always be the same ones - someone viewing on a mobile might think we supply kit from 3 different vendors and that's it!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
You will notice that the above row still displays random numbers between the 2 numbers you have chosen, (if you're in the full view on CodePen, it defaults to 1 and 25) but it only displays a subset of them, using overflow: hidden to hide the rest.