-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlev2Functions.js
More file actions
114 lines (97 loc) · 2.43 KB
/
Copy pathlev2Functions.js
File metadata and controls
114 lines (97 loc) · 2.43 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
function variable_one() {
{
document.getElementById("myInput").value = test;
}
}
function variable_two() {
if (two == 2)
}
function variable_three(){
if (three == 3)
}
function variable_four(){
if (four == 4)
}
*/
function stepOne()
{
window.alert("Hello! Let's Begin!")
window.alert("The first paragraph is wrong. Fix the sentence!")
}
function stepTwo()
{
var paragraph = document.getElementById('PartOne').innerHTML;
console.log(document.getElementById('PartOne'));
console.log(paragraph);
if (paragraph === "Our goal is to make sure Computer Science reigns supreme at UCLA.")
{
window.alert("Your first number is 1.");
window.alert("Change the UCLA Data Lab Header to Bold! So it looks legit");
}
else
{
window.alert( "Try Again. USC < UCLA.");
}
}
function stepThree()
{
var header = document.getElementById("CSHeader");
var headerStyle = getComputedStyle(header);
console.log(header);
console.log(headerStyle.fontWeight);
if (headerStyle.fontWeight >= 700)
{
window.alert("Correct! Your second number is 9.")
window.alert("There is a list below. But do the hours seem right?")
}
else
{
window.alert("Is it bold?")
}
}
function stepFour()
{
var listItem = document.getElementById('ListTwo').innerHTML;
if (listItem.includes("Closing Hour: 8pm"))
{
window.alert("Correct! Your third number is 6.");
window.alert("We want to change the below header to a bigger font! Increase the font by at least double");
}
else
{
window.alert("Are you sure that is correct?");
}
}
function stepFive()
{
var header2 = document.getElementById('header five');
var header2Style = getComputedStyle(header2);
var fontSizeInPixels = header2Style.fontSize;
var fontSize = parseInt(fontSizeInPixels.slice(0, -2));
if (fontSize >= 20)
{
window.alert ("Correct! Your final number is 9.");
window.alert("Input your data into the form!");
}
else
{
window.alert ("Is that big enough?");
}
}
function submission(){
var one = document.getElementById('firstchar').value;
var two = document.getElementById('secondchar').value;
var three = document.getElementById('thirdchar').value;
var four = document.getElementById('fourthchar').value;
if (one != 1 || two != 9 || three != 6 || four != 9)
{
window.alert("Wrong Input. Please Try Again!")
}
else
{
window.alert("You have succeeded")
window.alert("Did you know that the internet was invented at UCLA in 1969?")
window.location.href = atob("Y2F0Lmh0bWw=");
}
}