Description
Getting started
Here you can read about what Concept Exercises are and how they are structured:
If you have not done so yet, it is probably also helpful to do a couple of "Learning Exercises" (this is how they are called on the site) yourself. You can also look at the code of an existing concept exercise like bird-watcher
(concept for-loops
) for reference.
Goal
The goal here is to add a new concept object-destructering
and adapt the concept exercise "Elyses Destructered Enchantments" to teach array-destructering
and object-destructering
but not rest-and-spread
(the ...
operator).
Motivation
Currently, the concept exercise "Elyses Destructered Enchantments" teaches array destructing and the rest and spread operator which also includes object related content. Now we also want to teach object destructering as a concept. Since it would be too much to also add that into the same exercise, we want to have a new split. "Elyses Destructered Enchantments" should focus on array and object destructering in the context of extracting individual elements/properties. In turn, rest and spread is covered by a new exercise that the student will complete after "Elyses Destructered Enchantments".
Tasks
- Add the new
object-destructering
concept (see details below) - Remove
rest-and-spread
from the list of concepts taught by "Elyses Destructered Enchantments" in the root level config.json file - Change the "Elyses Destructered Enchantments" exercise so the student needs/practices only array and object destructering but not rest or spread (
...
) - Remove the rest and spread operator related content from exercise introduction.md, add the object destructering content instead
- Update the .meta/design.md file according to the new content
New Concept
Learning objectives
The new object-destructering
concept should include the following.
- Using destructuring to get a property
- Using destructuring to get a nested property
- Using destructuring to get multiple properties (object pattern shorthand)
- Using destructuring to rename properties
- Using default values in object destructuring
- Using nested destructuring.
Out of scope
- Anything specific with arrays because there is another concept for this
About.md Ideas
- Usage in the parameters directly,
- Usage when extracting data from e.g. a JSON response
- Usage in e.g. React
How to proceed
- First accept this issue by saying "I'd like to work on this" (no need to wait for a response, just go with it)
- Use this issue to discuss any questions you have, what should be included in the content and what not and to collect reference material.
- Create a PR and set "exercism/javascript" as reviewers. Additionally you can write in #maintaining-javascript that your PR is ready for review. Once you incorporated any critical feedback that the reviewer might give you and the PR is approved, it will be merged by a maintainer.