-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
40 lines (37 loc) · 1.03 KB
/
index.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
37
38
39
40
<!DOCTYPE html>
<html>
<head>
<title>Random Sentence Generator</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
.sentence {
font-size: 1.5em;
}
</style>
</head>
<body>
<div id="content" class="sentence">Loading...</div>
<script>
var words = ["in", "the", "age", "of,", "information", "ignorance", "is", "a", "choice"];
function shuffleArray(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
shuffleArray(words);
var sentence = words.join(" ");
document.getElementById("content").textContent = sentence;
</script>
</body>
</html>