Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Nitya 2T Lesson 3B

<!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>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.