-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstory.js
More file actions
36 lines (31 loc) · 1.84 KB
/
story.js
File metadata and controls
36 lines (31 loc) · 1.84 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
// TODO: Create 4-String variables to introduce develop your story.
// YOUR CODE GOES HERE
let introduction = 'Once upon a time in the far away planet of Cronos,';
let body = ' aliens were building up their forces to invade planet earth.';
let climax = 'The aliens took over the earth ';
let resolution = 'The humans took back the earth.';
// TODO: Create 3-String variables to set the time period of your story or discuss other number elements.
// YOUR CODE GOES HERE
let year = 2345;
let age = 345;
let century = 24;
// TODO: Create 1-Array variable to show a collection of items your character might have.
// YOUR CODE GOES HERE
let items = ['laser guns', 'portal openers', 'teleporter guns', 'lightsabers', 'timeship']
// TODO: Create 1-Boolean variable to demonstrate a true or false scenario.
// YOUR CODE GOES HERE
let invadedEarth = true;
// TODO: Print your story to the console.
// YOUR CODE GOES HERE
console.log('Greetings, my name is Nate and I will tell you about a story from when I was ' + age + ' and living in the ' + century + 'th century, more specifically, '+ year + '.');
console.log(introduction + body);
console.log('The aliens were loading ' + items[0] + ' onto the ' + items[4] + '.');
console.log('They used '+ items[1] + ' to travel to the planet of earth.');
console.log(climax + 'with ' + items[3] + '.');
console.log('I was hiding at that point, and I remembered someone asking me: "Has the earth been invaded?"');
console.log('I responded: ' + invadedEarth);
console.log('The aliens would use ' + items[2] + ' and ' + items[1] + ' to arrive and swarm the planet.' );
console.log('A small group of humans used what they had available and took the planet back.');
console.log('There was a massive battle with ' + items[3] + ' between the humans and aliens.' );
console.log('We won.');
console.log(resolution);