What is wrong with c?

Tell us what’s happening:
why the variable c is still undefined ?!

Your code so far


// 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!";

Your browser information:

User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1

Challenge: Understanding Uninitialized Variables

Link to the challenge:

You have an extra space in your initialization of c, remove that and it’ll pass the tests :slight_smile:

1 Like

Wow u saved my life!

Another question plz: do u know why my progress is not saved on the website?
It is very annoying

1 Like

There are two different types of saved progress for Free Code Camp: your profile and your browser cache.

A list of your completed challenges is saved to your account in the FCC database. You can see the list of completed challenges by looking at your public portfolio. With a growing curriculum already over 1,400 lessons and a community of millions of people, FCC does not store every solution to every challenge in its database. When you complete a challenge, there is a modal that gives you the option to download your solution. This gives you the option to save a copy of any solution that you may want to reference later. There are some challenges which are classified as projects required for certifications. Your solutions to those can be viewed on your settings page.

Your in-editor code is saved in your browser’s local storage. Recent in-progress code from the challenge editor is also saved in your local browser cache when you run tests. If you are completing lessons and do not see your recent code, then your local storage has been cleared or something is preventing FCC from writing to your browser’s storage. This could be a browser setting, a privacy extension, or a browser version incompatibility. Especially as you get to more complicated challenges that may take multiple sessions, I strongly recommend saving your in-progress work outside of the browser cache.

If you are not seeing anything saved when you use freeCodeCamp, your login session may have expired or your browser may be preventing freeCodeCamp from writing to your cache. I suggest logging out, clearing your cookies, and logging in again. Certain privacy extensions or nonstandard browsers can also interfere with your freeCodeCamp experience.

1 Like