-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuestion_No28.html
36 lines (31 loc) · 977 Bytes
/
Question_No28.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
//-----------------------------Q30 Hello Admin
let User_Name1=['admin','ali','hassan','mohsin','tabish'];
for(let i=0;i<=User_Name1.length;i++){
console.log(`${User_Name1[i]} you are welcome`)
}
if(User_Name1.indexOf('admin')!==-1){
console.log('Hello admin would you like to see a status report')
}
//-----------------------------------End Of Program Q30
//-----------------------------------Q30 part 2
let User_Name=['admin','ali','hassan','mohsin','tabish'];
for(let i=0;i<=User_Name.length;i++){
}
if(User_Name.indexOf('admin')!==-1){
console.log('Hello admin would you like to see a status report')
}else{
console.log('Hello eric ,thank you for logging in again')
}
</script>
</body>
</html>