Skip to content

Commit c9ed6c5

Browse files
committed
simplify
1 parent 3e50724 commit c9ed6c5

21 files changed

Lines changed: 13 additions & 42 deletions

File tree

exercises/01.expressions-and-output/02.problem.escaping-strings/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
// Learn to include special characters in strings
33

44
// 🐨 Log "It's working!" using single quotes (you'll need to escape the apostrophe)
5-
// 💰 Use the correct escape sequence for an apostrophe
65

76
// 🐨 Log: She said "Hi" (using double quotes for the string)
8-
// 💰 Use an escape sequence for the inner quotes
97

108
// 🐨 Log "Hello" and "World" on separate lines using a single string with \n
11-
// 💰 Use the newline escape sequence
129

1310
// 🐨 Log tab-separated data: Name: [tab] Age: [tab] City: (like column headers)
14-
// 💰 Use the tab escape sequence between words

exercises/01.expressions-and-output/05.problem.template-literals/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
// A better way to build strings
33

44
// 🐨 Log "The answer is 42" using a template literal with ${40 + 2}
5-
// 💰 Use a template literal with interpolation for the expression
65

76
// 🐨 Log "Hello, TypeScript!" using a template literal
87

98
// 🐨 Log a math problem like "10 times 5 equals 50"
10-
// 💰 Compute the result inside the template literal

exercises/02.variables/01.problem.let-and-const/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// 🐨 Add the muffin to the cart (update cartTotal)
1818

1919
// 🐨 Calculate the final total with tax
20-
// 💰 Calculate the tax from cartTotal and add it to get finalTotal
20+
// 💰 Include tax when computing the final total
2121

2222
// 🐨 Try uncommenting the line below - what happens?
2323
// TAX_RATE = 0.10

exercises/02.variables/02.problem.reassignment-vs-mutation/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ console.log('Original person:', person)
1010
// 💣 Uncomment the line above and see the TypeScript error
1111

1212
// 🐨 Now try MUTATING the object by changing the age property
13-
// 💰 Update the age property on the existing object
1413

1514
// 🐨 Mutate again by changing the city
16-
// 💰 Update the city property on the existing object
1715

1816
console.log('Modified person:', person)
1917

exercises/03.primitive-types/01.problem.numbers-and-strings/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
// 🐨 Create a `description` using a template literal that outputs:
1111
// "Product: TypeScript Guide | Price: $29.99 | In Stock: 100"
12-
// 💰 Use a template literal with interpolation
1312

1413
// ✅ These console.logs will verify your work
1514
// console.log('Price:', price)

exercises/03.primitive-types/03.problem.booleans-and-comparisons/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ const stockCount: number = 100
77
// 🐨 Create a variable `isAvailable` with type `boolean` set to `true`
88

99
// 🐨 Create a variable `hasDiscount` that's true when price is under 50
10-
// 💰 Use a comparison based on the price
1110

1211
// 🐨 Create a variable `canPurchase` that's true when isAvailable AND stockCount > 0
13-
// 💰 Combine conditions so both must be true
1412

1513
// 🐨 Create a variable `isNotAvailable` that's the opposite of `isAvailable`
16-
// 💰 Invert the boolean
1714

1815
// ✅ Verification
1916
// @ts-expect-error - 💣 remove this comment

exercises/03.primitive-types/05.problem.bigint-and-symbol/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33

44
// 🐨 Create a bigint variable `largeNumber` with the value 9007199254740993n
55
// This is larger than Number.MAX_SAFE_INTEGER!
6-
// 💰 Use a bigint literal with the `n` suffix
76

87
// 🐨 Create another bigint `anotherLarge` with value 1000000000000000000n
98

109
// 🐨 Add them together into a variable called `sum`
11-
// 💰 Add the two bigint values together
1210

1311
// 🐨 Create a symbol called `userId` with description 'user-id'
14-
// 💰 Create a symbol with the given description
1512

1613
// 🐨 Create another symbol called `anotherId` with the same description 'user-id'
1714

exercises/03.primitive-types/06.problem.truthy-falsy/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const cartTotal = 42
1111
const hasAcceptedTerms = false
1212

1313
// 🐨 Create a variable `hasUsername` based on the truthiness of `username`
14-
// 💰 Convert the value to a boolean
1514

1615
// 🐨 Create a variable `hasNickname` based on the truthiness of `nickname`
1716

exercises/04.control-flow/01.problem.conditionals/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
const score: number = 85
55

66
// 🐨 Create a variable `grade` of type string
7-
// 💰 let grade: string
87

98
// 🐨 Write if/else if/else to set the grade:
109
// - 90 and above: "A"
@@ -14,7 +13,6 @@ const score: number = 85
1413
// - Below 60: "F"
1514

1615
// 🐨 Create a variable `passed` that is true if grade is C or above
17-
// 💰 A passing grade is C or above
1816

1917
// console.log(`Score: ${score}`)
2018
// console.log(`Grade: ${grade}`)

exercises/04.control-flow/02.problem.switch-statements/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
const grade: string = 'B'
55

66
// 🐨 Create a variable `description` of type string
7-
// 💰 let description: string
87

98
// 🐨 Write a switch statement on `grade`:
109
// - case 'A': set description to "Excellent"
@@ -13,7 +12,7 @@ const grade: string = 'B'
1312
// - case 'D': set description to "Needs Improvement"
1413
// - case 'F': set description to "Failing"
1514
// - default: set description to "Invalid grade"
16-
// 💰 Don't forget the `break` after each case!
15+
// 💰 Each case should avoid falling through
1716

1817
// console.log(`Grade ${grade}: ${description}`)
1918

0 commit comments

Comments
 (0)