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

Update wording for step 5 of pyramid project #54608

Closed
jmmarco opened this issue May 2, 2024 · 6 comments · Fixed by #54750
Closed

Update wording for step 5 of pyramid project #54608

jmmarco opened this issue May 2, 2024 · 6 comments · Fixed by #54750
Labels
first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. new javascript course These are for issues dealing with the new JS curriculum scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.

Comments

@jmmarco
Copy link

jmmarco commented May 2, 2024

Describe the Issue

Currently on step number 5 there's a note that reads

Note that when reassigning a variable that has already been declared, you do not use the let keyword.

As it stands this note is incorrect and unnecessary.

Affected Page

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-introductory-javascript-by-building-a-pyramid-generator/step-5

Your code

No code, just instructions re-wording.




Expected behavior

The note could be changed to:

Note: You can only re-assign a variables that has been declared with let

Or we can simply remove it altogether instead.

Screenshots

Screen Shot 2024-05-02 at 10 31 38

System

  • Device: [Laptop]
  • OS: [MacOS 12.7.4]
  • Browser: [Chrome]
  • Version: [124.0.6367.91]

Additional context

No response

@jmmarco jmmarco added scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. labels May 2, 2024
@Sembauke
Copy link
Member

Sembauke commented May 2, 2024

The note is correct. I think you are interpertering it wrong?

It is saying let does not need to be used when re-assinging the variable with a new value.

edit: It is not saying that you can use any kind of keyword like const or var

@jmmarco
Copy link
Author

jmmarco commented May 2, 2024

I understand what's it's trying to convey, but it's written in a confusing way.
Here's the text directly copied into ChatGPT for some additional context:

Screen Shot 2024-05-02 at 11 01 54

@gikf
Copy link
Member

gikf commented May 2, 2024

Text refers to potential situation when both assignments are using let, ie:

let programmer = "Naomi";
let programmer = "CamperChan";

Depending on where exactly both are used, this can result in SyntaxError.


x = 10;

There's no let on this line. It's one of the cases when chat doesn't know what it's talking about.

@huyenltnguyen
Copy link
Member

Hi @jmmarco, thank you for creating the issue.

As Sem pointed out, we don't think the note should be updated to

Note: You can only re-assign a variables that has been declared with let

because the new version communicates different information from the original.


I think the confusion came from the word "declared". The word isn't needed since "reassigning" already implies that the variable has been declared, so I'd propose changing the sentence a little:

--- Note that when reassigning a variable that has already been declared, you do **not** use the `let` keyword.
+++ Note that when reassigning a variable, you do **not** use the `let` keyword again.

cc'ing @jdwilkin4 for input, since you're much more experienced with this kind of change than I am 😄

@huyenltnguyen huyenltnguyen added status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. new javascript course These are for issues dealing with the new JS curriculum and removed status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels May 8, 2024
@jmmarco
Copy link
Author

jmmarco commented May 8, 2024

Thanks for the input @huyenltnguyen your proposal addresses the issue I presented👍

@jdwilkin4 jdwilkin4 changed the title Confusing note/clarification in Step 5 - JavaScript Algorithms and Data Structures (Beta) - Building a Pyramid Generator Update wording for step 5 of pyramid project May 8, 2024
@jdwilkin4 jdwilkin4 added first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. and removed status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. labels May 8, 2024
@jdwilkin4
Copy link
Contributor

That change works for me.
Let's open it up for first timers

Note to contributors

This has been opened for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors.

If you would like to contribute and have not read the contributors docs, please do so here: https://contribute.freecodecamp.org/#/

If you have any issues with contributing, be sure to join us on the contributors channel, or on the contributors sub-forum

Files that need to be changed

https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-introductory-javascript-by-building-a-pyramid-generator/660ef31a5be625914a0102cd.md

updated description

When a variable is declared with the `let` keyword, you can <dfn>reassign</dfn> (or change the value of) that variable later on. In this example, the value of `programmer` is changed from `"Naomi"` to `"CamperChan"`.

```js
let programmer = "Naomi";
programmer = "CamperChan";
```

Note that when reassigning a variable, you do **not** use the `let` keyword again.

After your `console.log`, assign the value `"World"` to your `character` variable.

Happy coding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. new javascript course These are for issues dealing with the new JS curriculum scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Projects
None yet
5 participants