I dont no where im going wrong

Tell us what’s happening:

Your code so far

// Only change code below this line
var a = 6;
var b = 15;
var 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 (Linux; Android 10; SM-G975U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36.

Challenge: Understanding Uninitialized Variables

Link to the challenge:



You have given the incorrect values to the variables when you initialise them:

1 Like

I dont understand where I went wrong…

1 Like

These are the values you have initialised the variables with. These are not the values the test asks you to use. :slight_smile:

1 Like

Isn’t that how u set u up what was different with my code

1 Like

That’s the code you have. These are not the values that the test asks you to use.

For example, the test wants you to initialise the variable a with a value of 5, but you have initialised it with a value of 6.

1 Like

Ok thanku I will try

1 Like

I tried it and it doesn’t seem to work am a string is underlined in red…what is wrong with that

1 Like

I used to have the same error, this wonderful guy solved it to me. Good luck.

Thanku I will try it

var c = "I am a String!;"

Check out where the > ; <was placed.
give it a correction and tell me if that was the problem! :slight_smile:

Other than that, the values must be corrected.

The instructions asked you to initiate the code by using these 3 values >
`a` , `b` , and `c` with `5` , `10` , and `"I am a"`
which means that respectively,
A = 5 / B = 10 and c = “I am a” …
which means that A and B will receive numbers and C a string.
But how do you create these variables and give them those extra predetermined values using JScript?
Just by writing :

var ‘nameOfYourVariable’ = number or “string”; >> When you´re giving it a String value, you MUST apply “” to the equation, and then place -> ; when you’re finished.

In Case you’re stuck, here´s the resolution.

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

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

You can post solutions that invite discussion (like asking how the solution works, or asking about certain parts of the solution). But please don’t just post your solution for the sake of sharing it.
If you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.

Greeting from Brazil, dear Italian cousin!

Please try with the following initialization:

var a= 5;

var b = 10;

var c= “I am a”;

thanku i just figured it out i am on next quiz…thois one is harder,i dont under stand this consept