I think this might help you
01 <html>
02 <head>
03 <script type = "text/javascript">
04
05 //player1 variables
06 var dice1 = ["1", "2", "3", "4", "5", "6"]; //string for concatenation
07 var dice2 = ["1", "2", "3", "4", "5", "6"];
08 var score1; //concatenation
09 var total1 = 0; //total number of wins
10
11 //player2 variables
12 var dice3 = ["1", "2", "3", "4", "5", "6"];
13 var dice4 = ["1", "2", "3", "4", "5", "6"];
14 var score2;
15 var total2 = 0;
16 var rnum = 0; //round number for table from 1 till 5
17 var decicsion1; //if player1 won
18 var decision2; // if player2 won
19 var round = 0; //the counter variable to limit the button to be clicked 5 times
20
21
22 //starting table headers
23 document.writeln("<table border = \"1\"><thead>");
24 document.writeln("<th>Round</th>" + "<th>Player 1</th>" + "<th>Player 2</th></thead><tbody>"); //1st row
25
26 if (round<=5) // here starts the counter to limit and let the function only work 5 times for the button
27 {
28 //IDK what to put here return 0; does nothing obviously. I want it to close after the button has been clicked the 5th time.
29
30 function play()
31 {
32 //player1
33 dice1 = Math.floor( 1 + Math.random() * 6 ); //this should randomize the string values or generate new numbers.
34 dice2 = Math.floor( 1 + Math.random() * 6 );
35 score1 = dice1 + dice2; //concatination I've seen this method there is another methods like score1 = dice1.concat(dice2); both do not work
36
37 //player2
38 dice3 = Math.floor( 1 + Math.random() * 6 );
39 dice4 = Math.floor( 1 + Math.random() * 6 );
40 score2 = dice3 + dice4;
41
42
43 //total wins
44 /*what I want this to do is add 1 to the winner so player1, 2 start at 0,0
45 then who ever wins its 0,1 then 1,1 or 0,1 like a soccer scoring board*/
46 if (score1>score2)
47 {
48 total1 += 1;
49 total2 += 0;
50 }
51 else{
52
53 total1 += 0;
54 total2 += 1;
55 }
56 //desicion of who won
57 if (total1>total2)
58 {
59 decision1= document.write("Winner");
60 decision1= document.write("Loser");
61 }
62 else{
63 decision1= document.write("Loser");
64 decision1= document.write("Winner");
65 }
66
67
68
69
70 // The 3x8 table that has all the results
71 rnum = Math.floor(5 * Math.random()); //round number
72 document.writeln("<tr><td>round</td><td>"+rnum+"</td><td>"+score1+"</td><td>"+score2+"</td><tr>");// 1-5 rows
73 document.write("<tr><td>total</td><td>"+total1+"</td><td>"+total2+"</td><tr>"); //6th row
74 document.write("<tr><td>Winner</td><td>"+decision1+"</td><td>"+decision2+"</td><tr>"); //7th row
75 }
76 } //closeing of the if-statment
77
78 </script>
79 </head>
80 <body>
81 <form action="">
82 <input type="button" value="Roll Dice" onclick="play()">
83 </form>
84 </body>
85 </html>