Create a Variable


I can't figure out how to set a variable equal to a string. I feel like an idiot since I went back a read over the intro to JavaScript again but didn't see it in there.

var myName ='strength';
console.log(myName , "50,000 pounds");


Your declaration is correct, but the lesson checker may not be expecting what you logged out. Try removing that line, or only print the variable and nothing else.


Okay. But the objective of the lesson is to set the variable to the 50,000 pounds. I'm just having a hard time understanding how to set it to that.


Use the name strength without quotes on the left side of the equals sign, and the other string on the right side.

... = '50,000 pounds'


Ooooh! Thank you so much!!!


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