# freeCodeCamp Challenge Guide: Use the JavaScript Console to Check the Value of a Variable

**URL:** <https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-use-the-javascript-console-to-check-the-value-of-a-variable/18372>\
**Category:** freeCodeCamp Contributors\
**Tags:** guide\
**Created:** [July 7, 2016, 11:33pm UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-use-the-javascript-console-to-check-the-value-of-a-variable/18372 "2016-07-07T23:33:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![camperbot](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/camperbot/32/18364_2.png) [@camperbot](https://forum.freecodecamp.org/u/camperbot)\
**Post date:** [July 7, 2016, 11:33pm UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-use-the-javascript-console-to-check-the-value-of-a-variable/18372/1 "2016-07-07T23:33:58Z")

</div>

# [Use the JavaScript Console to Check the Value of a Variable](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/debugging/use-the-javascript-console-to-check-the-value-of-a-variable)

> **Solution 1 (Click to Show/Hide)**
>
> * * *
> 
> ## Solutions
> 
> ```js
> let a = 5;
> let b = 1;
> a++;
> // Add your code below this line
> 
> let sumAB = a + b;
> console.log(sumAB);
> 
> console.log(a);
> 
> ```

---

<div class="post-metadata">

**Author:** ![anon52159105](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@anon52159105](https://forum.freecodecamp.org/u/anon52159105)\
**Post date:** [August 6, 2017, 11:40pm UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-use-the-javascript-console-to-check-the-value-of-a-variable/18372/2 "2017-08-06T23:40:58Z")

</div>



---

<div class="post-metadata">

**Author:** ![camperbot](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/camperbot/32/18364_2.png) [@camperbot](https://forum.freecodecamp.org/u/camperbot)\
**Post date:** [August 10, 2019, 1:18am UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-use-the-javascript-console-to-check-the-value-of-a-variable/18372/3 "2019-08-10T01:18:50Z")

</div>



---

<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 7, 2025, 12:00pm UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-use-the-javascript-console-to-check-the-value-of-a-variable/18372/4 "2025-01-07T12:00:05Z")

</div>


