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
34 lines (22 loc) · 776 Bytes
/
app.js
File metadata and controls
34 lines (22 loc) · 776 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
console.log("Hello World!\n==========\n");
console.log(
"Follow the steps in the README.md file to complete the exercises:\n==========\n"
);
// Exercise 1
const firstName = "Tal";
console.log(firstName);
let lastName = "Amitai";
console.log(lastName);
var age = 99;
console.log(age);
// Exercise 2
let fullName = firstName + " " + lastName;
console.log(fullName);
//how to do template literal?
// Exercise 3
const city = "Culver City"
const pastime = "playing sports and traveling"
let myStory = "Hi, my name is " + fullName + "! " + "I am from " + city + ". " + "My favorite things to do are " + pastime + ".";
console.log(myStory)
let myStory1 = `\Hi, my name is ${fullName}! I am from ${city}. My favorite things to do are ${pastime}.`;
console.log(myStory1)