-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs6.html
35 lines (35 loc) · 1.08 KB
/
js6.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="X-UA-Compatible"content="ie-edge">
<title>loops in js</title>
</head>
<body>
<div class="container">
this is a page
</div>
<script>
//alert in in-browser javascript
alert("this is a message")
d=prompt("what is your name;");
console.log(d)
let m=confirm("do you want to accept cookies");
console.log(m)
if (m){
console.log("your post has been successfully deleted");
}
else{
console.log("sorry but your post is not deleted")
}
let age=prompt("enter your age")
if(age>18){
console.log("you are eligible for voting");
}
else{
console.log("you are not eligible for voting");
}
</script>
</body>
</html>