diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..99950a5 Binary files /dev/null and b/.DS_Store differ diff --git a/src/variables.ts b/src/variables.ts index bd5e775..186cc73 100644 --- a/src/variables.ts +++ b/src/variables.ts @@ -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 @@ -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 @@ -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 (: