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


#1

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.

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

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.


#2

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


#3

This is the line of code I wrote @ Denys

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


#4

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);


#5

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


#6

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


#7

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


#8