forked from truecodersio/JavaScript_Variables
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
46 lines (30 loc) · 977 Bytes
/
app.js
File metadata and controls
46 lines (30 loc) · 977 Bytes
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
console.log("Hello World!\n==========\n");
console.log(
"Follow the steps in the README.md file to complete the exercises:\n==========\n"
);
// Exercise 1
var fullName = "John Tuck";
let firstName = "John";
let lastName = "Tuck";
var age = 26;
let greeting = "My name is " + fullName;
let templateGreeting = `My name is ${fullName}`;
let ageInDays = `My age in days: ${age * 365}`;
fullname = `${firstName} ${lastName}`;
firstName = "JOHN";
lastName = "TUCK";
var age = 27;
// Exercise 2
var hobbie = "coding";
var hobbie2 = "spending time with Family"
let hobbie3 = "chill and do nuttin."
var hobbies = [hobbie, hobbie2];
var story = `My favorite hobby is ${hobbie}
and I like ${hobbie2}`;
// Exercise 3
let city = "Merritt Island";
let state = "Florida";
let story2 = `My name is ${fullName} born and raised in ${state}
I grew up in a small city ${city},\n where the only thing to really do around here is to ${hobbie3}
${story}. `
console.log(story2);