<!DOCTYPE html> <title></title> <body> <script> var backgrounds = ["red", "blue", "green", "yellow"]; var randomIndex = Math.round(Math.random()*3); document.body.style.background = backgrounds[randomIndex]; </script> </body>