-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
48 lines (39 loc) · 1.34 KB
/
index.js
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
46
47
48
function cll() {
var button = document.getElementById("hi");
buttonvalue = button.value;
alert(buttonvalue + " clicked me")
};
function cee() {
console.log("The names are: euwain, zak, no name bob, cookie, scout", "Katerin");
var buttonn = document.getElementById("text");
buttonvaluee = buttonn.value;
let names = ["euwain", "zak", "no name bob", "cookie", "scout", "Katerin"];
//alert(buttonvaluee)
if(buttonvaluee == names[0]) {
alert("hi " + buttonvaluee + " you have access");
return true;
};
if(buttonvaluee == names[1]) {
alert("hi " + buttonvaluee + " you have access");
return true;
};
if(buttonvaluee == names[2]) {
alert("hi " + buttonvaluee + " you have access");
return true;
};
if(buttonvaluee == names[3]) {
alert("hi " + buttonvaluee + " you have access");
return true;
};
if(buttonvaluee == names[4]) {
alert("hi " + buttonvaluee + " you have access");
return true;
};
if(buttonvaluee == names[5]) {
alert("hi " + buttonvaluee + " you have access");
return true;
};
alert("Your name was not on the list sorry");
alert("if know me and you want access please request")
return false;
};