# Understanding Uninitialized Variables(new to us)

**URL:** <https://forum.freecodecamp.org/t/understanding-uninitialized-variables-new-to-us/292274>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [July 4, 2019, 11:37pm UTC](https://forum.freecodecamp.org/t/understanding-uninitialized-variables-new-to-us/292274 "2019-07-04T23:37:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Linta](https://avatars.discourse-cdn.com/v4/letter/l/b487fb/32.png) [@Linta](https://forum.freecodecamp.org/u/Linta)\
**Post date:** [July 4, 2019, 11:37pm UTC](https://forum.freecodecamp.org/t/understanding-uninitialized-variables-new-to-us/292274/1 "2019-07-04T23:37:16Z")

</div>

\*\*Tell us what’s happening  
Hi everyone  
I,m new to JavaScript and I,m kind of stuck here I can,t figure out what’s wrong with my code; Can anyone plz guide me.  
Thanks

**Your code so far**

```js

// Initialize these three variables
var a;
var b;
var c;
var a = 6;
var b = 15;
var c = “I am a String!”;
// Do not change code below this line

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

```

**Your browser information:**

User Agent is: `Mozilla/5.0 (iPad; CPU OS 12_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Mobile/15E148 Safari/604.1`.

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![ryansalindo](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ryansalindo/32/143998_2.png) [@ryansalindo](https://forum.freecodecamp.org/u/ryansalindo)\
**Post date:** [July 4, 2019, 11:54pm UTC](https://forum.freecodecamp.org/t/understanding-uninitialized-variables-new-to-us/292274/2 "2019-07-04T23:54:22Z")

</div>

So the variables are already declared here for you with a “undefined” value. The challenge is to initialize them with the given values. I don’t want to give too much away, lmk if you need more help!

---

<div class="post-metadata">

**Author:** ![Zaxx81](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/zaxx81/32/119165_2.png) [@Zaxx81](https://forum.freecodecamp.org/u/Zaxx81)\
**Post date:** [July 5, 2019, 3:09am UTC](https://forum.freecodecamp.org/t/understanding-uninitialized-variables-new-to-us/292274/3 "2019-07-05T03:09:29Z")

</div>

Everything that you are supposed to do in a challenge is below the gray line (horizontal rule) and above the **Run the Tests** button. So it looks like you are initializing to them to what they should be when the rest of the code runs, instead of the values it tells you to.

 ![2019-07-04%20(2)](https://global.discourse-cdn.com/freecodecamp/original/3X/2/6/2664c0cf620a17a97dfadd67e081d29034625199.png)

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [July 5, 2019, 4:36am UTC](https://forum.freecodecamp.org/t/understanding-uninitialized-variables-new-to-us/292274/4 "2019-07-05T04:36:01Z")

</div>

You need to change the three existing lines: variables are declared with `var` the first time they appear, so it should appear only once per variable. Plus you need to _initialize_ them, and that means giving them a value on the same line they are declared

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 25, 2021, 12:35pm UTC](https://forum.freecodecamp.org/t/understanding-uninitialized-variables-new-to-us/292274/5 "2021-01-25T12:35:46Z")

</div>

Closed on January 25, 2021, 12:35pm UTC


