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
54 lines (45 loc) · 1.41 KB
/
app.js
File metadata and controls
54 lines (45 loc) · 1.41 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
console.log("Hello World!\n==========\n");
console.log(
"Follow the steps in the README.md file to complete the exercises:\n==========\n"
);
// Exercise 1
let lastName;
var age;
// Exercise 2
const firstName = "Yash";
lastName = "Bajaj";
age = 20;
console.log("First Name:", firstName);
console.log("Last Name:", lastName);
console.log("Age:", age);
// Exercise 3
let language = "JavaScript";
let createdYear = 1995;
let isCaseSensitive = true;
console.log("Language:", language);
console.log("Created Year:", createdYear);
console.log("Is Case Sensitive:", isCaseSensitive);
// Exercise 4: Declaring and Assigning Values to Variables x2
let price = 19.99;
let isOnSale = false;
let salePercentage = 15;
let stock = 0;
let inStock = false;
let selectedSize = "M";
console.log("Price:", price);
console.log("Is On Sale:", isOnSale);
console.log("Sale Percentage:", salePercentage);
console.log("Stock:", stock);
console.log("In Stock:", inStock);
console.log("Selected Size:", selectedSize);
// Exercise 5: Declaring and Assigning Values to Variables x3
let title = "Name of the Wind";
let author = "Patrick Rothfuss";
let pageCount = 722;
let bookmark = 456;
let hasRead = true;
console.log("Title:", title);
console.log("Author:", author);
console.log("Page Count:", pageCount);
console.log("Bookmark:", bookmark);
console.log("Has Read:", hasRead);