<!DOCTYPE html> <html> <title>Web Page Design</title> <head> <script> //task 6 var lightmode = Math.floor((Math.random()*3)+1) document.write("Light Mode = " + lightmode + "<br>"); if (lightmode == 1){ document.write("Red man. Do not cross the road."); } else if (lightmode == 2){ document.write("Green man. Cross the road."); } else { document.write("Orange man. Do not cross the road."); } </script> </head> <body> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more