Understanding Uninitialized Variables doesn’t work for me

**Tell us what’s happening:
It doesn’t work. Help please!!!

Your code so far


// Only change code below this line
var a = 5;
var b = 10;
var c = "I am a string!";
c = " I am a string";
// Only change code above this line

a = a + 1;
b = b + 5;
c = c + " String!";

Your browser information:

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

Challenge: Understanding Uninitialized Variables

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.


why are you assigning a value to c twice?

1 Like

I did two because the first c doesn’t work.

Initialize the three variables a , b , and c with 5 , 10 , and "I am a" respectively so that they will not be undefined .

Did you use the values from the instructions?

This is what I did in the first try:
// Initialize these three variables

var a = 5;

var b = 10;

var c = “I am a”;

// Do not change code below this line

a = a + 1;

b = b + 5;

c = c + " String!";

Wait, I just figured it out. Thank you to those who give me advice

1 Like