Skip to content

Commit 688406d

Browse files
committed
refactor: remove outdated function exercises and update package-lock
- Deleted the `02.problem.parameters-and-returns` exercise and its associated files, including index.ts, package.json, and README. - Added new entries for `02.problem.parameters` and `02.solution.parameters` in package-lock.json to reflect the updated structure. - Marked certain entries as extraneous to clean up the dependency tree.
1 parent e5fe554 commit 688406d

9 files changed

Lines changed: 17 additions & 13 deletions

File tree

exercises/05.functions/02.problem.parameters-and-returns/README.mdx renamed to exercises/05.functions/02.problem.parameters/README.mdx

File renamed without changes.

exercises/05.functions/02.problem.parameters-and-returns/index.ts renamed to exercises/05.functions/02.problem.parameters/index.ts

File renamed without changes.

exercises/05.functions/02.problem.parameters-and-returns/package.json renamed to exercises/05.functions/02.problem.parameters/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "exercises_05.functions_02.problem.parameters-and-returns",
2+
"name": "exercises_05.functions_02.problem.parameters",
33
"type": "module",
44
"scripts": {
55
"start": "npx @kentcdodds/log-module ./index.ts",

exercises/05.functions/02.solution.parameters-and-returns/README.mdx renamed to exercises/05.functions/02.solution.parameters/README.mdx

File renamed without changes.

exercises/05.functions/02.solution.parameters-and-returns/index.test.ts renamed to exercises/05.functions/02.solution.parameters/index.test.ts

File renamed without changes.

exercises/05.functions/02.solution.parameters-and-returns/index.ts renamed to exercises/05.functions/02.solution.parameters/index.ts

File renamed without changes.

exercises/05.functions/02.solution.parameters-and-returns/package.json renamed to exercises/05.functions/02.solution.parameters/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "exercises_05.functions_02.solution.parameters-and-returns",
2+
"name": "exercises_05.functions_02.solution.parameters",
33
"type": "module",
44
"scripts": {
55
"start": "npx @kentcdodds/log-module ./index.ts",

exercises/05.functions/04.solution.arrow-functions/README.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
1. **Implicit returns** work when the function body is a single expression—no
88
braces, no `return` keyword needed
99
2. **Arrow functions are perfect for callbacks** because they're concise and
10-
don't rebind `this`
10+
don't rebind `this` (we'll learn about `this` later)
1111
3. **Function declarations** are still best for top-level named functions
1212
because of hoisting and clearer stack traces
1313

@@ -27,7 +27,3 @@ function processOrder(order: Order): Receipt {
2727
// ...
2828
}
2929
```
30-
31-
The `this` binding difference matters in React class components (rarely used
32-
now) and some object-oriented patterns. Arrow functions capture `this` from
33-
their surrounding scope, while regular functions get their own `this`.

package-lock.json

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)