Freecodecamp: Error in lesson: Basic JavaScript - Manipulate Arrays With shift()

Created on 31 May 2018  路  3Comments  路  Source: freeCodeCamp/freeCodeCamp

Describe your problem and - if possible - how to reproduce it

When running this program the example array, "removedFromOurArray" on line 3 isn't declared so it gives the error, "removedFromOurArray is not defined". This happens even if the individual practicing got the lesson correct.

Add a Link to the page with the problem

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-shift

Tell us about your browser and operating system

  • Browser Name: Google Chrome
  • Browser Version: 66.0.3359.181 (Official Build) (64-bit)
  • Operating System: Windows 10

If possible, add a screenshot here

image

Most helpful comment

the issue is here on line 3, the variable provided in the lesson template is not declared with var.
image

@OrionYEC to pass the lesson in the meanwhile, please add the var keyword to line 3 in the editor. Thank you for reporting this issue.

All 3 comments

the issue is here on line 3, the variable provided in the lesson template is not declared with var.
image

@OrionYEC to pass the lesson in the meanwhile, please add the var keyword to line 3 in the editor. Thank you for reporting this issue.

Hi @OrionYEC, thanks for reporting the issue. It was addressed in #17287 and the fix was already merged (https://github.com/freeCodeCamp/freeCodeCamp/pull/17239). All we can do now is to wait for the next deployment for the change to take effect.
You can use @mstellaluna 's solution to pass the challenge for now.

Thank you for reporting this issue @OrionYEC

This is a standard message notifying you that this issue appears to be very similar to issue #17287 , so I am closing it as a duplicate.

If you think I鈥檓 wrong in closing this issue, please reopen it and add further clarification. Thank you, and happy coding.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MichaelLeeHobbs picture MichaelLeeHobbs  路  3Comments

vaibsharma picture vaibsharma  路  3Comments

danielonodje picture danielonodje  路  3Comments

itsmikewest picture itsmikewest  路  3Comments

Tzahile picture Tzahile  路  3Comments