# display a variable in the console

**URL:** https://discourse.mozilla.org/t/display-a-variable-in-the-console/122633
**Category:** Developer Tools
**Created:** [September 14, 2023, 10:16am UTC](https://discourse.mozilla.org/t/display-a-variable-in-the-console/122633 "2023-09-14T10:16:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Letocha\_Torgue\_Philippe](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@Letocha\_Torgue\_Philippe](https://discourse.mozilla.org/u/Letocha_Torgue_Philippe)
#### Post date: [September 14, 2023, 10:16am UTC](https://discourse.mozilla.org/t/display-a-variable-in-the-console/122633/1 "2023-09-14T10:16:30Z")

</div>

I often use “inspect” mode (right click on a page and ‘inspect’) to test and understand javascript. Here is my problem, the display of the contents of a variable differs if I display it with console.log or if I simply type its name. A screenshot will certainly be clearer:

 ![image](https://us1.discourse-cdn.com/flex001/uploads/mozilla/original/3X/0/5/05635bc6e96c5c4ee888c8681be76517d567ee7f.png)
