Basic JavaScript - Declare String Variables I cannot understand all the concept of message

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

Your code so far


var myName ="myFirstName";
var myName ="myLastName";

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 6.0; BGO-DL09) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Mobile Safari/537.36

Challenge: {{challengeTitle}} Basic JavaScript - Declare String Variables

Link to the challenge:

the objective of this challenge is to create 2 variables.
these variables are called myFirstName and myLastName. To these variables you should give the value of your own first and last names as strings. Check the given example. The first one is how a variable is declared. But it can be declared as in the second example and assigned a value, initializing it.
Hope this helps.

Let me give a simple example:

var myFirstName = “Giulius”;
var myLastName = “Caesar”;

What does this mean? I have created two variables (var) with the arguments myFirstName and myLastName. What is written in inverted commas (‘’) is the description inside my variables:

var myFirstName = “Foo”;
var myLastName = ‘Mickey Mouse’;

1 Like

Thanks I have got it

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