I know theirs gotta be hundreds of ways to go about this. I'm trying to to generate just 5 numbers on my screen...with a unicode of course. I have that part done, got my cards appearing with a different suit....

but the next thing I want to do is sort them....from left to right Ace - King order. No clue how to go about this.

Heres what I have.

var suit = new Array(4);
suit[1] = "\u2663";
suit[2] = "\u2660";
suit[3] = "\u2665";
suit[4] = "\u2666";



var card = new Array(13);
card[1] = "A";
card[2] = "2";
card[3] = "3";
card[4] = "4";
card[5] = "5";
card[6] = "6";
card[7] = "7";
card[8] = "8";
card[9] = "9";
card[10] = "10";
card[11] = "J";
card[12] = "Q";
card[13] = "K";

var ranNum1 = Math.floor(13*Math.random()) + 1;
var ranNum2 = Math.floor(13*Math.random()) + 1;
var ranNum3 = Math.floor(13*Math.random()) + 1;
var ranNum4 = Math.floor(13*Math.random()) + 1;
var ranNum5 = Math.floor(13*Math.random()) + 1;
var ranSuit1 = Math.floor(4*Math.random()) + 1;
var ranSuit2 = Math.floor(4*Math.random()) + 1;
var ranSuit3 = Math.floor(4*Math.random()) + 1;
var ranSuit4 = Math.floor(4*Math.random()) + 1;
var ranSuit5 = Math.floor(4*Math.random()) + 1;

document.write("<center><font size='12'><table border='2' bordercolor='black' style='background-color:green' cellpadding='6'><tr>");
document.write(card[ranNum1], suit[ranSuit1]);
document.write(card[ranNum2], suit[ranSuit2]);
document.write(card[ranNum3], suit[ranSuit3]);
document.write(card[ranNum4], suit[ranSuit4]);
document.write(card[ranNum5], suit[ranSuit5]);
document.write("</tr></table></font></center>");



the table doesn't work either....it just gives a line under each number and suit.