Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
16 changes: 16 additions & 0 deletions src/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ let hobby: string;
let funFact: string;
let image: string;

fullName = "Bashaier Khaled AlMeshaile";
yearOfBirth = 1996;
hobby = "Learning New Staff";
funFact =
"Now, my brain has 100000 tabs open, and none of them are loading....";
image = "My-image";
/**
* Part 2: String Interpolation
* Create the following new variables that interpolate
Expand All @@ -28,6 +34,12 @@ let image: string;
let fullNameString: string;
let ageString: string;
let hobbyString: string;
const myAge = 2025 - yearOfBirth;

fullNameString = `My name is ${fullName}`;
ageString = `I am ${myAge}`;
hobbyString = `My hobby is ${hobby}`;
console.log(`${fullNameString}.\nI am ${myAge}.\n${hobbyString}. `);

/**
* Part 3: Re-assignment
Expand All @@ -38,16 +50,20 @@ let hackerScore = 0;

function incrementBy1() {
// Increment hackerScore by 1 👇🏻
hackerScore++;
}
function decrementBy1() {
// decrement hackerScore by 1 👇🏻
hackerScore--;
}

function incrementBy2() {
// Increment hackerScore by 2 👇🏻
hackerScore = hackerScore + 2;
}
function decrementBy2() {
// decrement hackerScore by 2 👇🏻
hackerScore = hackerScore - 2;
}

// Ignore this part (:
Expand Down