<html> <head> <title>die Roller</title> <script> var rollRaw = 0; var rollBigger = 0; var rollInt = 0; var rollFinal = 0; var result = ""; rollRaw = Math.random(); rollBigger = rollRaw * 6; rollInt = Math.floor(rollBigger); rollFinal = rollInt + 1; result = "rollRaw: " + rollRaw + "\n"; result += "rollBigger: " + rollBigger + "\n"; result += "rollInt: " + rollInt + "\n"; result += "rollFinal: " + rollFinal + "\n"; alert(result); </script> </head> <body> </body> </html>