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.

'Understanding Uninitialized Variables' accepts code that breaks the rules

See original GitHub issue

Understanding Uninitialized Variables

Link here

Accepts invalid code

One of the test cases is: "Do not change code below the line." However, you can still pass the challenge if you change code below that line.

Browser Information

  • Browser Name, Version: Firefox 46
  • Operating System: Ubuntu 14.04 LTS
  • Mobile, Desktop, or Tablet: Desktop

Your Code

// Initialize these three variables
var a;
var b;
var c;

// Do not change code below this line

a = a + 1;
b = b + 5;
c = c + " String!";

a = 6;
b = 15;
c = "I am a String!";

// This passes.

Screenshot

screenshot of the code passing

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ltegmancommented, May 17, 2016

@FreeCodeCamp/issue-moderators What do you think? I don’t think these kinds of errors are worth fixing because as an optional challenge the only point is for the students learning benefit. If a student chooses to blatantly disregard the instructions they are only harming their own learning potential.

0reactions
ganksquadcommented, Jul 10, 2017

a = 5 + 1; b = 10 + 5; c = “I am a” + " String!"; this is how i did ! but could not pass “Do not change code below the line” so tried your solutions and it worked!

Read more comments on GitHub >

github_iconTop Results From Across the Web

'Understanding Uninitialized Variables' accepts code ... - GitHub
Understanding Uninitialized Variables Link here Accepts invalid code One of the test cases is: "Do not change code below the line.
Read more >
Understanding Uninitialized Variables - Free Code Camp
In this basic JavaScript tutorial we learn about uninitialized variables in the language of JavaScript. This is one more part in a large ......
Read more >
Understanding Uninitialized Variables - Basic JS - Ep 6/111
If you'd like to join me in completing this certification, join my discord server (https://madisonkanna.com/codebookclub), and once you're ...
Read more >
EXP33-C. Do not read uninitialized memory
Uninitialized automatic variables or dynamically allocated memory has indeterminate values, which for objects of some types, can be a trap representation.
Read more >
Scope of uninitialized variable in JavaScript - Stack Overflow
A var is not scoped inside of a loop, and curly braces do not defined a new closure. Basically, the value of j...
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