Check for not a number (NaN) | Javascript functions | ServiceNow
hi everyone in this video I am going to discuss about another JavaScript function which is also very very useful in certain other scenarios so let me take you quickly to a demo form that I created specifically for this demo and here I have two fields and demo values one and two wherein I am expecting values to be into decimal form and if I enter value in any of those since the total should populate to the total value so let's enter a certain value in demo value 2 and if I click anywhere this is populated as not a number because I did not enter a venue in demo value one this is empty and I am trying to pass that value into a decimal value which gives me a not a number and if I try to add anything with not a number it gives me not a number so let's see what is the name of that function which is useful in this case so I am going to navigate to the client step that I have written to populate the values in the total value C so this is the client here I can simply have a check on the demo one and the name of my function is s n a n so if this is not a number I can set demo one two zero let's save it foreign [Music] function and thank you for watching
https://www.youtube.com/watch?v=yIoJk6UNvJg