Answers for "how to get the integer part of a string in javascript"

0

how to get the integer part of a string in javascript

str1 = "test123.00".replace ( /[^\d.]/g, '' );
  str2 = "yes50.00".replace ( /[^\d.]/g, '' );
  total = parseInt(str1, 10) + parseInt(str2, 10);
  alert(total);
Posted by: Guest on August-25-2021

Code answers related to "how to get the integer part of a string in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language