diff --git a/src/variables.ts b/src/variables.ts index bd5e775..584d467 100644 --- a/src/variables.ts +++ b/src/variables.ts @@ -9,11 +9,12 @@ * 5. image -> assign it a value of a url of your image or ant image that represents you online */ -let fullName: string; -let yearOfBirth: number; -let hobby: string; -let funFact: string; -let image: string; +let fullName = "abdullah alrashidi"; +let yearOfBirth = 1997; +let hobby = "learning new things"; +let funFact = "N/A"; +let image = + "https://kagi.com/proxy/i?c=lWla4SiEvVNmj85b_dW2HcBDkb-62vZXR0vAz8RZagraa-B0kctl6HMpJBfI3PHU8zfu-Tx4xTP5uLoSBz-BfPuw1aWrl2HTqAlvm_6p9qIQwtSbmZpyqdJSIsf7tr5spE50vWE73b0yjS5Eu_N-MFynZT8VTBchju_OZN3d2XU%3D"; /** * Part 2: String Interpolation @@ -25,9 +26,9 @@ let image: string; * 3. hobbyString -> assign it: "My hobby is {YOUR_HOBBY}"" */ -let fullNameString: string; -let ageString: string; -let hobbyString: string; +let fullNameString = `My name is ${fullName}`; +let ageString = `I am ${2025 - yearOfBirth}`; +let hobbyString = `My hobby is ${hobby}`; /** * Part 3: Re-assignment @@ -38,16 +39,20 @@ let hackerScore = 0; function incrementBy1() { // Increment hackerScore by 1 👇🏻 + hackerScore = hackerScore + 1; } function decrementBy1() { // decrement hackerScore by 1 👇🏻 + hackerScore = hackerScore - 1; } function incrementBy2() { // Increment hackerScore by 2 👇🏻 + hackerScore = hackerScore + 2; } function decrementBy2() { // decrement hackerScore by 2 👇🏻 + hackerScore = hackerScore - 2; } // Ignore this part (: