Skip to content

Separate rest-and-spread into its own new concept exercise (concept exists) #1500

Open
@junedev

Description

@junedev

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 is to create new concept exercise that teaches the use of the rest and spread operator in the context of functions (rest parameters), arrays and objects.

Motivation

Currently, the concept exercise "Elyses Destructered Enchantments" teaches array destructing and the rest and spread operator (...) which also includes object related content. In the future 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. In the future, we want to change "Elyses Destructered Enchantments" so that it focuses on array and object destructering in the context of extracting individual elements/properties. In turn, rest and spread should be covered by a new exercise that the student will complete after "Elyses Destructered Enchantments".

Please note that updating the existing exercise "Elyses Destructered Enchantments" is out of scope for this issue. There will be a separate issue for that later.

Concepts

The concept rest-and-spread already exists but feel free to improve the content or add more advanced content to the about.md file as you see fit.

https://github.com/exercism/javascript/tree/main/concepts/rest-and-spread

Learning Objectives

The student should learn what is covered in the existing concept: https://github.com/exercism/javascript/blob/main/concepts/rest-and-spread/introduction.md

Prerequisites

The following things should be assumed and defined as prerequisites for the exercise.

  • functions
  • array-destructering (in the context of extracting individual elements, no rest operator)
  • Although this concept is not available yet, you can assume the student also already knows about object destructering (in the context of extracting individual properties)

Story

Here some hints what can help to come up with a story for the exercise.

  • Think about/write down some tasks you would like the student to do (just generic tasks, no story), sometimes that already sparks an idea for a story to wrap the tasks.
  • Browse through the existing stories https://exercism.org/docs/building/tracks/stories (click on the individual story in the menu on the left), usually you won't find an exact match but some story might spark your inspiration for some general theme.
  • In the end, you can make nearly every story fit every concept so just picking some theme and rolling with it also works.

Help

You can choose to do this solo-style, or collaborate with multiple people on this. The suggested approach is to

  1. First accept this issue by saying "I'd like to work on this" (no need to wait for a response, just go with it) and optionally request that someone works with you (and wait for a second person to accept your request).
  2. Use this issue to discuss any questions you have, what should be included in the content and what not and to collect reference material.
  3. 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions