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.

[beta]Es6: Problems with the var keyword

See original GitHub issue

Challenge 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:closed
  • Created 7 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
abigailbeetscommented, Sep 5, 2017

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.

0reactions
profoundhubcommented, Dec 27, 2017

Getting error: // running test "missing ) after argument list" // tests completed

Read more comments on GitHub >

github_iconTop 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 >

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