Assigning a variable

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

Your code so far


var myFirstname = "W";
var myLastname = "B";

I don't see the problem with this code that I wrote.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0

Challenge: Declare String Variables

Link to the challenge:

Welcome to the forum.

You almost have it. Reread the instructions carefully:

Create two new string variables: myFirstName and myLastName and assign them the values of your first and last name, respectively.

Remember that capitalization matters in JavaScript. It is not required in JS but it is strongly recommended in JS to use camelCase for variable names (with a few exceptions that will comes later). With camelCase, you smoosh the words together and capitalize the first letter of each word except for the first word. So, “my favorite Mexican food” would becomes “myFavoriteMexicanFood”. Remember that “first name” is two words, so how would that be in camelCase? If it’s “my first name”?

1 Like