Create a variable - Exercise (2/6) - It says 'the test returned an error. Maybe you have a syntax error, or a typo'

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

Hello, am new to this forum and I need some assistance to proceed because am stuck. Details of the exercise and the generated error are provided below. Thanks in anticipation for your favorable reactions.
<Below this line, add a link to the EXACT exercise that you are stuck at.>

https://www.codecademy.com/courses/learn-javascript/lessons/variables/exercises/create-a-variable?action=lesson_resume

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

Oops! The test returned an error. Maybe you have a syntax error, or a typo. Hide error.
ReferenceError: strength is not defined
at Object.eval (eval at get (createVariable.js:2:1), :1:1)
at Object.get (createVariable.js:2:1)
at Context. (test.js:7:21)
ReferenceError: strength is not defined
at Object.eval (eval at get (createVariable.js:2:1), :1:1)
at Object.get (createVariable.js:2:1)
at Context. (test.js:11:21)

```

Replace this line with your code.

<do not remove the three backticks above>

Please, post your full code. Should be syntax error in your code.

This is the line of code I wrote @ Denys

var myStrength= ‘50,000 pounds’;
console.log(‘How much stuff can a variable hold?’, myStrength);

1 Like

The exercise
1.
Variables must be strong to hold all of our stuff. Exactly how strong are they?

Create a variable named strength, and assign the string ‘50,000 pounds’ to it.
Stuck? Get a hint
2.
Now, under the strength variable, type- console.log(‘How much stuff can a variable hold?’, strength);

1 Like

Have gotten the code now, thanks @ Denys for your reaction.

1 Like

should be var strength = …; as instruction says. Did you pass this lesson?

3 Likes

28 posts were merged into an existing topic: Me and my bro only