I have stored two variables that generate simulate two random die rolls. I'm trying to add them in another paragraph like in the following; however, the line that adds them generates a "NaN". Any suggestions?
<!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Rolling Two Dice</title>
</head>
<body>
<p>Your first die rolled a <script>var roll1 = document.write(1 +
Math.floor(6 * Math.random()))</script>.</p>
<p>Your second die rolled a <script>var roll2 = document.write(1 +
Math.floor(6 * Math.random()))</script>.</p>
<p>The total of your rolls is <script>document.write(roll1 +roll2)</script>.</p>
</body>
</html>