# What's wrong with my code? I don't get it

**URL:** <https://forum.freecodecamp.org/t/whats-wrong-with-my-code-i-dont-get-it/176653>\
**Category:** General\
**Created:** [February 25, 2018, 8:49pm UTC](https://forum.freecodecamp.org/t/whats-wrong-with-my-code-i-dont-get-it/176653 "2018-02-25T20:49:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spengjohnson](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@spengjohnson](https://forum.freecodecamp.org/u/spengjohnson)\
**Post date:** [February 25, 2018, 8:49pm UTC](https://forum.freecodecamp.org/t/whats-wrong-with-my-code-i-dont-get-it/176653/1 "2018-02-25T20:49:47Z")

</div>

// Setup  
var a;  
var b = 2;

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

---

<div class="post-metadata">

**Author:** ![Quickz](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/quickz/32/105441_2.png) [@Quickz](https://forum.freecodecamp.org/u/Quickz)\
**Post date:** [February 25, 2018, 9:10pm UTC](https://forum.freecodecamp.org/t/whats-wrong-with-my-code-i-dont-get-it/176653/2 "2018-02-25T21:10:23Z")

</div>

I’m assuming you’re talking about this: [https://www.freecodecamp.org/challenges/storing-values-with-the-assignment-operator](https://www.freecodecamp.org/challenges/storing-values-with-the-assignment-operator) ?  
**a** and **b** variables are already declared and there’s no need to assign **7** to the variable **b**.

> **Hint**
>
> The **var** is unnecessary since it’s already used above your code.  
> Second line from the bottom should be deleted.

> **Solution**
>
> ```auto
> // Setup
> var a;
> var b = 2;
> 
> // Only change code below this line
> a = 7;
> b = a;
> 
> ```

---

<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 17, 2021, 8:25pm UTC](https://forum.freecodecamp.org/t/whats-wrong-with-my-code-i-dont-get-it/176653/3 "2021-01-17T20:25:57Z")

</div>


