question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Confusion In Test Output

See original GitHub issue

Describe the Issue

Occasionally users are confused by the test output, as changing the contents of FCC can result in a message about capitalizing the variable name.

Affected Page

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword

Your code

const FCC = "FreeCodeCamp"; // Change this line
let fact = "is cool!"; // Change this line
fact = "is awesome!";
console.log(FCC, fact); // Change this line

Expected behavior

Two possibilities here.

  1. add a sentence stating that the user should not change the variable contents

  2. split the relevant test into two parts, one for changing the capitalization of the variable name and the other for not changing the contents

Screenshots

No response

System

All

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jeremyltcommented, Jun 2, 2022

https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md

Suggested test change:

FCC should be a constant variable declared with const.

assert.match(code, /const\s+FCC/);

The string assigned to FCC should not be changed.

assert.equal(FCC, 'freeCodeCamp');

Suggested lesson content change:

–instructions–

Change the code so that all variables are declared using let or const. Use let when you want the variable to change, and const when you want the variable to remain constant. Also, rename variables declared with const to conform to common practices. Do not change the strings assigned to the variables.

0reactions
ieahleencommented, Jun 4, 2022

This looks something that can be fixed by “first time” code contributors to this repository. For details look at Jeremy’s comment above, https://github.com/freeCodeCamp/freeCodeCamp/issues/46295#issuecomment-1145129600.

Please make sure you read our guidelines for contributing, we prioritize contributors following the instructions in our guides. Join us in our chat room or the forum if you need help contributing, our moderators will guide you through this.

Sometimes we may get more than one pull requests. We typically accept the most quality contribution followed by the one that is made first.

Happy contributing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

COVID-19 rapid tests can breed confusion; here's how to ...
COVID-19 rapid tests can breed confusion; here's how to make sense of the results. By Nate Hafer, PhD, and Apurv Soni, MD, PhD'21....
Read more >
Understanding Confusion Matrix | by Sarang Narkhede
What is Confusion Matrix and why you need it? Well, it is a performance measurement for machine learning classification problem where output can...
Read more >
How to create a confusion matrix with the test result in your ...
So I just to explain how to create a confusion matrix if you doing an image classification model. At first, we need to...
Read more >
How to Compute the Confusion Matrix of Your Tests After ...
With enough tests in your dataset, it's time to draw a confusion matrix to decide what to do with that seemingly abstract number....
Read more >
COVID-19 rapid tests can breed confusion - Yahoo News
Adding to the confusion are personal accounts of people who are experiencing confusing or seemingly contradictory test results.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found