Thursday, June 27, 2019

ServiceNow parseInt() is returning NaN all the times

This is a common issue and the resolution is to pass both the parameters to the parseInt() method. It accepts the second parameter, which is the base

var testString = "10101"
var number = parseInt(testString, 10) + 100


The second parameter indicates that this integer has to be generated in base10

-------------------------------------------------------------------------------------------------------------
Are you looking to implement custom solutions in ServiceNow?

You are at the right place. Reach us at

Conyx IT Solutions | ServiceNow experts
partners@conyxit.com