forked from TimTCrouch/WordList-JS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtesting.html
37 lines (33 loc) · 915 Bytes
/
testing.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
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script src="src/wordList.min.js"></script>
<script src="src/wordBank.min.js"></script>
</head>
<body>
<p>
This is the test bed.
<script>
//Test that a word is in the list
var cWord = "xylol";
if (Word_List.isInList(cWord)) {
document.write("<br>" + cWord + " was there!");
} else {
document.write("<br>" + cWord + " was NOT there...");
}
//Test that a word is NOT in the list
var cWord = "ab234ol";
if (Word_List.isInList(cWord)) {
document.write("<br>" + cWord + " was there!");
} else {
document.write("<br>" + cWord + " was NOT there...");
}
//Test the random word generator with random letter counts
for (var x = 0; x < 5; x++) {
document.write("<br>Random word: " + Word_List.getRandomWord());
}
</script>
</p>
</body>
</html>