Judging from your comments, it sounds like you have a small range of values (i.e. from 1-10) which you want to randomly select your values from.
In that case your best bet is to store your values in an array and randomly splice them out.
I prefer to perform these kinds of operations using some sort of generator.
function createRandomGenerator( array ) {
return function() {
return array.splice(Math.floor(Math.random() * array.length ),1)[0];
}
}
To use the generator creator, provide it with your short list of unique values, and store the result. The result is a generator you can use to generate N number of random numbers from your list of unique values. (Where N is the length of the array you seeded your random generator with).
var random1to10 = createRandomGenerator( [1,2,3,4,5,6,7,8,9,10] );
You can then use the generator by calling the generator that that function returns over and over.
var a = [];
for( var i = 0; i < 10; i++ ) {
a.push( random1to10() );
}
alert(a.join(','));
If you do not have a pre-defined set of numbers you wish to use, I'd recommend Török Gábor's solution above.
Cheers!