Created
February 19, 2013 17:30
-
-
Save mark-d-holmberg/4988002 to your computer and use it in GitHub Desktop.
How to add numbers in javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updateTotalManualFeeSubTotals = function() { | |
var subtotal; | |
subtotal = 0.0; | |
$("td.manual-fee-sub-total").map(function() { | |
var value; | |
value = parseFloat(this.innerHTML.replace("$", "")); | |
if (!isNaN(value)) { | |
return value; | |
} | |
}).each(function(i, e) { | |
return subtotal += parseFloat(e) || 0.0; | |
}); | |
return subtotal; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment