Declare String Variables
Previously you used the following code to declare a variable:
var myName;
But you can also declare a string variable like this:
var myName = "your name";
"your name"
is called a string literal. A string literal, or string, is a series of zero or more characters enclosed in single or double quotes.
Create two new string variables: myFirstName
and myLastName
and assign them the values of your first and last name, respectively.
Tests
- Waiting: 1.
myFirstName
should be a string with at least one character in it. - Waiting: 2.
myLastName
should be a string with at least one character in it.
/** * Your test output will go here */