The answers given by Adil and Minko have a major problem (although Minko at least constrained it to a small set of numbers): They go over the same numbers over and over again.
In that sense, a better method would be to create the array containing the possible values, shuffle it and then just pop elements off of it. This will require the complexity of shuffling the array, but it will get rid of the problem mentioned above.
var elements = [1, 2, 3, 4];
elements.shuffle(); // not a standard Javascript function, needs to be implemented
while( elements.length > 0 ) {
console.log( elements.pop() );
}