I have 100 values in an array but I need to select 5 value randomly on every click one button and I have one value e.g a=10 this a value shouldn’t come in the 5 selected value.
I tried in different way but I am not able to do it in jquery. please any help me.
The following code may help. The calculateRandoms function calculates 5 different random numbers from the numbers array each time. The random number cannot be value of excludedNumber. You can change randomCount variable to modify the number of random numbers that calculateRandoms will generate.