diff --git a/src/variables.ts b/src/variables.ts index bd5e775..767e96f 100644 --- a/src/variables.ts +++ b/src/variables.ts @@ -9,11 +9,11 @@ * 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: string = "Lolwa Alromi and Razan Alkhateeb"; +let yearOfBirth: number= 2001; +let hobby: string= "cooking"; +let funFact: string = "Graduated from KUNIV"; +let image: string ="https://th.bing.com/th?id=OIP.GqGVPkLpUlSo5SmeDogUdwHaHa&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2"; /** * Part 2: String Interpolation @@ -24,10 +24,11 @@ let image: string; * 2. ageString -> assign it: "I am {YOUR_AGE}"", and make sure you calculate your age from your year of birth * 3. hobbyString -> assign it: "My hobby is {YOUR_HOBBY}"" */ +const d : Date = new Date(); +let fullNameString: string = `My name is ${fullName}`; -let fullNameString: string; -let ageString: string; -let hobbyString: string; +let ageString: string = `I am ${d.getFullYear() - yearOfBirth}`; +let hobbyString: string = `My hobby is ${hobby}`; /** * Part 3: Re-assignment @@ -38,16 +39,23 @@ let hackerScore = 0; function incrementBy1() { // Increment hackerScore by 1 👇🏻 + // hackerScore++; + // console.log(hackerScore) + return hackerScore++ ; } function decrementBy1() { // decrement hackerScore by 1 👇🏻 + return hackerScore--; } function incrementBy2() { // Increment hackerScore by 2 👇🏻 + return hackerScore+=2; } function decrementBy2() { // decrement hackerScore by 2 👇🏻 + return hackerScore-=2; + } // Ignore this part (: