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
39 lines (33 loc) · 1.1 KB
/
app.js
File metadata and controls
39 lines (33 loc) · 1.1 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
37
38
39
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 = "Theo";
let lastName;
var age;
// Exercise 2
lastName = "Boateng";
age = 23;
// Exercise 3
let language = "JavaScript";
let createdYear = 1995;
let isCaseSensitive = true;
// Exercise 4
let price = 19.99;
let isOnSale = false;
let salePercentage = 15;
let stock = 0;
let inStock = false;
let selectedSize = "M";
// Exercise 5
let title = "Name of the Wind";
let author = "Patrick Rothfuss";
let pageCount = 722;
let bookmark = 456;
let hasRead = true;
// Console log all variables
console.log(`My name is ${firstName} ${lastName} and I am ${age} years old.`);
console.log(`Language: ${language}, Created in: ${createdYear}, Case Sensitive: ${isCaseSensitive}`);
console.log(`Price: $${price}, On Sale: ${isOnSale}, Sale Percentage: ${salePercentage}%, Stock: ${stock}, In Stock: ${inStock}, Selected Size: ${selectedSize}`);
console.log(`Title: ${title}, Author: ${author}, Pages: ${pageCount}, Bookmark: ${bookmark}, Has Read: ${hasRead}`);