C should not contain undefined and should have a value of "I am a String!"

C should not contain undefined and should have a value of "I am a String!"
0

#1

Tell us what’s happening:

Your code so far

// Setup
var a;
var b = 2;

// Only change code below this line
var = 7;

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0.

Link to the challenge:


#2

The challenge instructions are:

Assign the value 7 to variable a.

Assign the contents of a to variable b.

When you declare a variable, you use the following syntax:

  var variableBeingDeclared;

When you want to declare a variable and assign it an initial value (initializing a variable), you use the the following syntax:

  var variableBeingInitialized = value;

When a variable has already been declared (var in front) and you want to assign a value to the variable, you use the following syntax:

  variableBeingAssignedAValue = value;

You have var = 7; which results in a error, because you used var without specifying a variable name before the = operator.

Now, try to assign the number 7 to variable a. Hint: Variable a has already been declared (var a;)

Then, assign variable a to variable b. Hint: Variable already has a value of 2, so b is just a value of 2.


#3
.red-text { color: red; }

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats