Basic JavaScript - Declare JavaScript Variables

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

var ourName = "Cindy";

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36

Challenge: Basic JavaScript - Declare JavaScript Variables

Link to the challenge:

1 Like

I have done both the 2nd and 3rd code (name “Cindy”) and var = 7. Both are coming back as incorrect. I actually copied the example for the 2nd one “Raphel” and it still gave an error. Assistance please and thank you.

“Use the var keyword to create a variable called myName.”

You don’t want to assign it a value, you just want to create a variable named myName, just like they created the variable ourName in the instructions.

In your code above your created the variable ourName instead and mistakenly assigned it a value.

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