# Javascript "NaN" statistics

**URL:** <https://community.hubspot.com/t/javascript-nan-statistics/13233>\
**Category:** CMS Development\
**Tags:** javascript\
**Created:** [February 26, 2019, 12:41pm UTC](https://community.hubspot.com/t/javascript-nan-statistics/13233 "2019-02-26T12:41:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jlawal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jlawal/32/5125_2.png) [@Jlawal](https://community.hubspot.com/u/Jlawal)\
**Post date:** [February 26, 2019, 12:41pm UTC](https://community.hubspot.com/t/javascript-nan-statistics/13233/1 "2019-02-26T12:41:50Z")

</div>

Hi all 🙂

I’m working on [this page](https://www.groupcall.com/partners). There is a blue banner above the ‘Other opportunities’ section that displays stats. In the page editor the stats display correctly (please see image below). I have updated this page a number of times but the first three stats don’t display, showing “NaN” instead.

 ![delete.PNG.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/d/cd87c01dc9c102c83bd02ecb4389182786df1ea1.jpeg)  
Page editor view

Any advise on this would be greatly appreciated.

Many thanks,

Jamila

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [February 26, 2019, 1:38pm UTC](https://community.hubspot.com/t/javascript-nan-statistics/13233/2 "2019-02-26T13:38:58Z")

</div>

Hey @Jlawal Interesting issue here!

NaN for the non-js user means “not a number”.

So Somewhere between the editor and something is interfearing with the script.

Now this is just a guess, but if you enter the final numbers 20,012 or 75,085,670 into the editor without the commas does that change anything?

My thought here is that maybe there is an error when parsing the author input.

---

<div class="post-metadata">

**Author:** ![Jlawal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jlawal/32/5125_2.png) [@Jlawal](https://community.hubspot.com/u/Jlawal)\
**Post date:** [February 26, 2019, 1:54pm UTC](https://community.hubspot.com/t/javascript-nan-statistics/13233/3 "2019-02-26T13:54:14Z")

</div>

Hi @Kevin-C , thank you for your help!

I’ve removed the commas and the nan has disappeared. You were right! Do you know if there is anyway to add the commas back in in a way that doesn’t affect anything? It looks a bit odd without the commas  
 ![16x16_smiley-very-happy.png.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/a/a83ec960612094a57cfb392e21c202c8e77b967c.png)

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [February 26, 2019, 2:05pm UTC](https://community.hubspot.com/t/javascript-nan-statistics/13233/4 "2019-02-26T14:05:58Z")

</div>

@JlawalGreat to hear!

You can updae the number using jQuery.

With that said there are a hundreds of jQuery solutions.

Here are some ideas to look into.

1) Updating the script that modifies the DOM element(displayed number) itself. Rather than “printing” the number it could print a string thst would include the commas. This would probably best replicate the animation you have currently.

2) Update the DOM element aftert the animation.

---

<div class="post-metadata">

**Author:** ![Jlawal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jlawal/32/5125_2.png) [@Jlawal](https://community.hubspot.com/u/Jlawal)\
**Post date:** [March 20, 2019, 10:21am UTC](https://community.hubspot.com/t/javascript-nan-statistics/13233/5 "2019-03-20T10:21:16Z")

</div>

Thank you for your help with this @Kevin-C . That has worked perfectly!  
 ![16x16_cat-very-happy.png.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/2/825d1b2ddaada5b07fbe1234bceee86bbd6f638a.png)
