-
Notifications
You must be signed in to change notification settings - Fork 26.7k
/
raw-text.txt
47 lines (32 loc) · 1.15 KB
/
raw-text.txt
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
1. COMPLETE VARIABLE AND FUNCTION DEFINITIONS
const customName = document.getElementById('customname');
const randomize = document.querySelector('.randomize');
const story = document.querySelector('.story');
function randomValueFromArray(array){
const random = Math.floor(Math.random()*array.length);
return array[random];
}
2. RAW TEXT STRINGS
It was 94 fahrenheit outside, so :insertx: went for a walk. When they got to :inserty:, they stared in horror for a few moments, then :insertz:. Bob saw the whole thing, but was not surprised — :insertx: weighs 300 pounds, and it was a hot day.
Willy the Goblin
Big Daddy
Father Christmas
the soup kitchen
Disneyland
the White House
spontaneously combusted
melted into a puddle on the sidewalk
turned into a slug and crawled away
3. EVENT LISTENER AND PARTIAL FUNCTION DEFINITION
randomize.addEventListener('click', result);
function result() {
if(customName.value !== '') {
const name = customName.value;
}
if(document.getElementById("uk").checked) {
const weight = Math.round(300);
const temperature = Math.round(94);
}
story.textContent = ;
story.style.visibility = 'visible';
}