-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJS_Assignment_Q31.js
More file actions
30 lines (28 loc) · 926 Bytes
/
JS_Assignment_Q31.js
File metadata and controls
30 lines (28 loc) · 926 Bytes
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
let l_users = ['Admin', "wahab", "aslam", "riyyan", "Farman"];
if(l_users.length === 0) {
console.log("We need to find some users!");
}
else {
for (let i = 0; i < l_users.length; i++) {
if(l_users[i] === "Admin"){
console.log("Hello admin, would you like to see a status report?")
}
else{
console.log(`Hello ${l_users[i]}, thank you for logging in again.`)
}
}
}
l_users = [];
if(l_users.length === 0) {
console.log("We need to find some users!");
}
else {
for (let i = 0; i < l_users.length; i++) {
if(l_users[i] === "Admin"){
console.log("Hello admin, would you like to see a status report?")
}
else{
console.log(`Hello ${l_users[i]}, thank you for logging in again.`)
}
}
}