# Simple addition

**URL:** <https://forum.kirupa.com/t/simple-addition/239735>\
**Category:** Uncategorized\
**Created:** [September 25, 2007, 2:45pm UTC](https://forum.kirupa.com/t/simple-addition/239735 "2007-09-25T14:45:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maureen27](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@maureen27](https://forum.kirupa.com/u/maureen27)\
**Post date:** [September 25, 2007, 2:45pm UTC](https://forum.kirupa.com/t/simple-addition/239735/1 "2007-09-25T14:45:56Z")

</div>

I have collect totals in text boxes vars are:  
var 1stTotal  
var 2ndTotal  
var 3rdTotal

I need to total these textboxes answers into a totalScore.  
I have the following, but it puts the 1st total and undefined for the others  
ie 100%undefinedundefined

How do I get this to add up the numbers?

totalScore = 1stTotal + 2ndTotal + 3rdTotal;

also how do I get percent to round off to 2place, like 33.33333% to 33%

Thanks
