Learn javascript: 2 Create a variable


#1

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?



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


#2

Is this all your code,

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


#3

OMG must read "Learn" better..sorry! thanks about your time.


#4

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