-
Notifications
You must be signed in to change notification settings - Fork 0
/
solarsystem(js).html
45 lines (44 loc) · 1.14 KB
/
solarsystem(js).html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=<device-width>, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
let name=prompt("enter the name of solar system")
if(name==="mercury")
{
alert("hi,it is closest to the sun")
}
else if(name==="venus"){
alert("hi,im the hottest planet")
}
else if(name==="earth"){
alert("home!!")
}
else if(name==="mars"){
alert("hi,im red desert with rocky terrains")
}
else if(name==="jupiter")
{
alert("hi,im the largest planet")
}
else if(name==="saturn"){
alert("hi,i have a beautiful ring")
}
else if(name==="uranus"){
alert("hi,i have gas and ice")
}
else if(name==="neptune")
{
alert("hi,im the farthest planet")
}
else
{
alert("u have entered the wrong planet name")
}
</script>
</body>
</html>