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: Comparison and Conditionals #989

Closed
junedev opened this issue Feb 21, 2021 · 4 comments
Closed

[V3] Implement new Concept Exercise: Comparison and Conditionals #989

junedev opened this issue Feb 21, 2021 · 4 comments
Assignees
Labels
new exercise ✨ x:rep/large Large amount of reputation

Comments

@junedev
Copy link
Member

junedev commented Feb 21, 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 teach the student how to compare values in Javascript and then use that in conditional statements.

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.

  • comparison
  • conditionals

Learning Objectives

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

Comparison

  • <, >, >=, <= for numbers and strings
  • strict equality (===)
  • not equal (!==)

Conditionals

  • if(){}
  • if(){} else{}
  • if(){} else if(){} else{}

Out of Scope

  • Loose equality == and truthy/falsy (will be taught once the student learned about type coercion)
  • Comparing values of different types
  • Shallow/deep comparison of objects
  • ternary operator x ? y : z
  • switch, for

About.md of the Concept

If there are no pitfalls, advanced usages etc. that you would like to point out, the about.md file can be a copy of the introduction.md of the concept.

For the conditionals concept here some ideas what to mention in the about.md file.

  • multiple else if
  • if statements without a block to execute just one thing (e.g., if(...) return ...)

Prerequisites

  • basics
  • booleans
  • numbers
  • strings

When the students start this exercise they only know some basics about the 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

Julia Conditionals Exercise could be used as template

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 junedev changed the title [V3] Implement new Concept Exercise: Comparision and Conditionals [V3] Implement new Concept Exercise: Comparison and Conditionals Feb 22, 2021
@junedev
Copy link
Member Author

junedev commented Feb 28, 2021

I will work on this.

@SleeplessByte
Copy link
Member

SleeplessByte commented Feb 28, 2021

FYI, I am expecting <repo-root>/concepts/comparison to exist after this PR as I am linking to it :)

I have created the folder structure in #1021

@junedev
Copy link
Member Author

junedev commented Mar 13, 2021

FYI a quick status update: I am done, I posted the PR as draft, I still need to resolve some conflicts and give it a self-review

@SleeplessByte
Copy link
Member

I'll review it once you undraft it :)

@junedev junedev closed this as completed Mar 17, 2021
@junedev junedev added the x:rep/large Large amount of reputation label Apr 27, 2022
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