[beta]Es6: Problems with the var keyword
See original GitHub issueChallenge Name
https://beta.freecodecamp.com/en/challenges/es6/problems-with-the-var-keyword
Issue Description
I’m not sure if it is a bug or just me, but I can’t seem to pass this challenge, even my simply commenting out let redNosedReindeer = "Comet"; and re-ordering the code so the hoisting is done correctly to assign redNosedReindeer before favorite
Your Code
`let redNosedReindeer = "Rudolph";
// let redNosedReindeer = "Comet";
let favorite = redNosedReindeer + " is Santa's favorite reindeer.";
`
Screenshot
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Problems with the var keyword (Example)
Andrew mentioned problematic or unexpected behaviours from using the var keyword. Exactly what kind of behaviours occurred?
Read more >[Beta] ES6 Section: some missing tests and titles, text ...
Explore Problems with the var Keyword. Formatting fixes; Add test to make sure let keyword is used instead of var. Compare Scopes of...
Read more >Is there any reason to use the "var" keyword in ES6?
The problem arises because the var keyword was introduced before const was supported, so backwards compatibility dictates that var doesn't necessary mean a ......
Read more >var - JavaScript - MDN Web Docs - Mozilla
The var statement declares a function-scoped or globally-scoped variable, optionally initializing it to a value.
Read more >Stop using var for declaring variables
let & const are JS keywords like var which can be used to create variables. This is how we declare variables using var...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi, newbie helper here. I think the directions should be re-written. “Use strict” is not required to pass the test and there is no function (so you can’t really use the function form of ‘is strict’); furthermore, wrapping the code in a function either fails all of the tests or says ‘something went wrong, try again later’. I would be happy to rewrite the directions to be more clear, or the tests to accommodate a function.
Getting error:
// running test"missing ) after argument list"// tests completed