Answers for "how to replace nan with a value in js"

0

how to replace nan with a value in js

if (isNaN(a)) a = 0;
Posted by: Guest on December-21-2020
0

how to replace nan with a value in js

function getNum(val) {
   val = +val || 0
   return val;
}
Posted by: Guest on December-21-2020

Code answers related to "how to replace nan with a value in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language