Basic JavaScript - Declare String Variables

Tell us what’s happening:
So I am confused about how to write the code

Your code so far

var myName;
var myName = Mason;

Your browser information:

Challenge: Basic JavaScript - Declare String Variables

Link to the challenge:

“Create two new string variables: myFirstName and myLastName

So you need to create two variables with the given names above.

“and assign them the values of your first and last name, respectively.”

And then set their values to your first and last name. Pay attention to this part of the instructions:

“A string literal, or string, is a series of zero or more characters enclosed in single or double quotes.”

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