Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions concepts/callbacks/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ You see this pattern often when dealing with asynchronous functions to assist wi
Common `Array` functions use callback functions to define their behaviour:

- `Array.prototype.forEach`:

- Accepts a callback, which applies the callback to each element of an array.

```javascript
Expand All @@ -92,7 +91,6 @@ Common `Array` functions use callback functions to define their behaviour:
```

- `Array.prototype.map`

- Accepts a callback, which applies the callback to each element of an array using the result to create a new array.

```javascript
Expand All @@ -103,7 +101,6 @@ Common `Array` functions use callback functions to define their behaviour:
```

- `Array.prototype.reduce`

- Accepts a callback, which applies the callback to each element of an array, passing the result forward to the next invocation.

```javascript
Expand Down
2 changes: 0 additions & 2 deletions concepts/closures/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ The name _closure_ is historically derived from [_λ-calculus_][wiki-lambda-calc
## Reasons to use closures in JavaScript

1. Data Privacy / Data Encapsulation

- Unlike other languages, in 2020, there was no way to specify _private_ variables. So closures can be used to effectively emulate _private_ variables (there was a proposal to introduce private variable notation, which might have become standard by the time you read this).

```javascript
Expand All @@ -37,7 +36,6 @@ The name _closure_ is historically derived from [_λ-calculus_][wiki-lambda-calc
```

2. Partial Application

- Functions may return functions, and when a returned function uses the argument of the function that created it, this is an example of using a closure to perform partial application. Sometimes this is called _currying_ a function.

```javascript
Expand Down
4 changes: 0 additions & 4 deletions exercises/concept/amusement-park/.meta/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,22 @@ This exercise could benefit from the following rules in the [analyzer][analyzer]
The comment types mentioned below only serve as a proposal.

1. `createVisitor`

- `actionable`: If the student used a helper variable, give feedback that the result can be returned directly.
- `celebratory`: If the student used classes, celebrate but let them know it is not necessary throughout this exercise.
- `informative`: If the student did not use the short-hand notation but wrote `name: name` etc instead, let them know how to shorten that.
The solution should be accepted nevertheless.

2. `revokeTicket`

- `essential`: Check the ticketId field is not deleted and re-added.
- `celebratory`: If they used a method on a visitor class, celebrate but let them know it is not necessary for this exercise.

3. `ticketStatus`

- `essential`: Using a type switch should be discouraged since it is confusing to read because of the `typeof null === 'object'` quirk.
- `informative`: If the student did not use early returns, maybe let them know about this alternative.
- `celebratory`: Congratulate if the student used a template string for the "sold" case
- `celebratory`: Congratulate if the student used a `value` helper variable.

4. `simpleTicketStatus`

- `essential`: Check `??` was used and not an if-statement or something else.
- `actionable`: If the student used a helper variable, give feedback that the result can be returned directly.

Expand Down
3 changes: 0 additions & 3 deletions exercises/concept/bird-watcher/.meta/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,16 @@ This exercise could benefit from the following rules in the [analyzer][analyzer]
For all tasks check that the student actually used a for loop.

1. `totalBirdCount`

- Verify that the condition is written with `< x.length` instead of `<= y.length -1`.
- Check whether a shorthand assignment `+=` was used to increase the sum (non-essential feedback).
- Verify the total was properly initialized with `0` instead of e.g. `null`
- Verify the increment operator was used in loop header step

2. `birdsInWeek`

- Verify a helper variable was used instead of duplicating the calculation in the initialization and condition of the loop
- Other checks should be the same as for `totalBirdCount`

3. `fixBirdCountLog`

- Check whether a shorthand assignment `+=` was used to increase the loop counter (non-essential feedback)
- Check whether the increment operator was used in the loop body

Expand Down
6 changes: 0 additions & 6 deletions exercises/concept/high-score-board/.meta/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,27 @@ The Concepts this exercise unlocks are:
This exercise could benefit from the following rules in the [analyzer][analyzer]:

1. `createScoreBoard`

- `essential`: Make sure no class, map etc. was created, there should be just an object.
- `actionable`: If the student created an empty object first and then added the value, give feedback to include the entry in the object literal directly.
- `actionable`: Check that the object was returned directly, no intermediate assignment to a variable necessary.

2. `addPlayer`

- `essential`: Check the assignment operator was used and no additional variables were declared.

3. `removePlayer`

- `essential`: Make sure `delete` was used and not set to undefined or null.
- `actionable`: If there is additional code to check whether the key is present before deleting it, give feedback that this is not necessary.

4. `updateScore`

- `actionable`: If the student used a separate variable to calculate the new value first, tell them it is not necessary.
- `actionable`: If the student did not use the shorthand assignment operator, tell them about it. If they used it already, give a `celebratory` comment.

5. `applyMondayBonus`

- `essential`: Check the student actually used `for...in`.
- Same feedback as in `updateScore` applies.
- Using `updateScore` in the solution should be treated as equally correct as the exemplar solution.

6. `normalizeScore`

- `actionable`: No intermediate variables necessary.

## Notes
Expand Down
3 changes: 0 additions & 3 deletions exercises/concept/mixed-juices/.meta/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ This exercise could benefit from the following rules in the [analyzer][analyzer]
The comment types mentioned below only serve as a proposal.

1. `timeToMixJuice`

- `essential`: Verify the student used a switch statement.
Would be nice if we could give different feedback depending on what the student used instead.
If it was if-else, comment that switch is better suited for so many different variants.
Expand All @@ -53,7 +52,6 @@ The comment types mentioned below only serve as a proposal.
```

2. `limesToCut`

- A solution that uses `if (limes.length < 0) break;` instead of combining the conditions should be considered equally correct to the exemplar solution.
The version in the exemplar file is shorter but the break version emphasizes that there is a special edge case.
- `essential`: Verify that `while` was used.
Expand All @@ -68,7 +66,6 @@ The comment types mentioned below only serve as a proposal.
- `celebratory`: Celebrate if the student used `++` and `+=`.

3. `remainingOrders`

- `essential`: Verify that do-while was used.
If while was used instead, say that do-while is a better fit because there is always at least one iteration (because `timeLeft` is always > 0) and the condition can best be checked after running the code.
- `essential`: Verify `timeToMixJuice` was reused instead of duplicating the code.
Expand Down
2 changes: 0 additions & 2 deletions exercises/concept/ozans-playlist/.meta/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ This exercise could benefit from the following rules in the [analyzer][analyzer]
For all tasks, verify that the student actually used a `Set`.

1. `addTrack`

- Verify that there was no redundant `Set.has()` call

2. `deleteTrack`

- Verify that there was no redundant `Set.has()` call

[analyzer]: https://github.com/exercism/javascript-analyzer
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"expect": "^29.7.0",
"globals": "^16.3.0",
"jest": "^29.7.0",
"prettier": "^3.5.3",
"prettier": "^3.6.2",
"shelljs": "^0.10.0"
},
"dependencies": {},
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.