Skip to content
Closed
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
20 changes: 12 additions & 8 deletions src/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "Raghad Butaiban";
let yearOfBirth: number = 1993;
let hobby: string = "Coding";
let funFact: string = "I usually start my day with a cup of coffee";
let image: string = "https://icon-library.com/images/user-png-icon/user-png-icon-16.jpg";

/**
* Part 2: String Interpolation
Expand All @@ -25,9 +25,9 @@ let image: string;
* 3. hobbyString -> assign it: "My hobby is {YOUR_HOBBY}""
*/

let fullNameString: string;
let ageString: string;
let hobbyString: string;
let fullNameString: string = `My name is ${fullName}`;
let ageString: string = `I am ${new Date().getFullYear() - yearOfBirth}`;
let hobbyString: string = `My hobby is ${hobby}`;

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

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

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

// Ignore this part (:
Expand Down