Learn javascript: 2 Create a variable

Hello, i have a problem to 2/6 Create a Variable, search it to forum and i see that the code it’s ok, i refresh page, try it to diferent browsers, report a (propably) bug, but i’m stuck here. What i do wrong?

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

```

var myStrength = ‘50,000 pounds’;
console.log(myStrength);

result is 50,000 pounds

Is this all your code,

Because the console is referring to an error with a variable named strength not myStrength.

OMG must read “Learn” better…sorry! thanks about your time.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.