Basic JavaScript - Declare String Variables

Tell us what’s happening:
Describe your issue in detail here. I don’t understand what I am doing wrong here with stringing “myName” with a variable ex. Darko. Please advise.

Your code so far

var darko = myFirstName ;
var rudnik = myLastName ;

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15

Challenge: Basic JavaScript - Declare String Variables

Link to the challenge:

Hi there and welcome to our community!

The challenge description:

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.

You should use this syntax when declaring a variable as a string (e.g. var myName = "igorgetmeabrain";).

1 Like