Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V3] Implement new Concept Exercise: While and Switch #991

Closed
junedev opened this issue Feb 22, 2021 · 1 comment
Closed

[V3] Implement new Concept Exercise: While and Switch #991

junedev opened this issue Feb 22, 2021 · 1 comment
Assignees
Labels
new exercise ✨ x:rep/large Large amount of reputation

Comments

@junedev
Copy link
Member

junedev commented Feb 22, 2021

Getting started

Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:

Please also watch the following video:

See the documentation above (general documentation), as well as How to implement a Concept Exercise in JavaScript.

Goal

The goal of this exercise is to introduce while and do-while loops as well as the switch statement.

Concepts

The following concept pages need to be created. You can combine the two introduction.md files from the concepts and use that as introduction.md for the concept exercise. No need to create different content at this point.

  • while-loops (incl. do-while)
  • conditionals-switch

Learning Objectives

In the concepts the student should learn about the following statements and then practice them in the concept exercise.

  • What does a while loop do
  • What is the difference to do-while
  • Syntax while(){} and do{} while()
  • Break and continue
  • What is the switch statement
  • Syntax switch(){}
  • What is the default case for
  • What does break do
  • Why is break so important when using switch

Out of Scope

  • for loops (were already taught before)

Also see "About" section below for other things that should not be part of the concept introduction and the exercise.

About.md of the Concept

Here some ideas of what could be mentioned.

  • Pitfall: infinite loops
  • Switch with more complex expressions

Prerequisites

  • comparison
  • arrays
  • for-loops

Besides these prerequisites the student only knows about basics and some primitive types. Keep that in mind when designing the exercise. See this list for details on the learning curve we are aiming for.

Exercise Idea

Swift Master Mixologist exercise could be used as a template but it needs to be simplified/shortened (e.g., the last task could be omitted). Keep in mind that for someone who knows the language, the exercise should be trivial and solvable in 5-10 minutes.

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" (you will not get 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 write down what you need (collect reference material) and discuss, if necessary, what to write and what not to write.
  3. Draft a PR and request the feedback from at least one other JavaScript member (you can ping the #maintaining-javascript channel in Slack).
@junedev
Copy link
Member Author

junedev commented Mar 30, 2021

I will work on this one next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new exercise ✨ x:rep/large Large amount of reputation
Projects
None yet
Development

No branches or pull requests

2 participants